james bulb
asked on
How do I insert a row at every change in number
Hi
I have a workbook and what im trying to do is at every change in number in column AZ I need to insert a blank row.
Any ideas?
I have a workbook and what im trying to do is at every change in number in column AZ I need to insert a blank row.
Any ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Many Thanks
You’re welcome and I’m glad I was able to help. You might also consider giving byundt some credit because if you delete rows 6 to 8 and uncomment row 9 in his code his result is the same as mine.
If you expand the “Full Biography" section of my profile you’ll find links to some articles I’ve written that may interest you including a new one concerning your Experts Exchange rank.
Marty - Microsoft MVP 2009 to 2017
Experts Exchange Most Valuable Expert (MVE) 2015, 2017
Experts Exchange Top Expert Visual Basic Classic 2012 to 2018
Experts Exchange Top Expert VBA 2018
Experts Exchange Distinguished Expert in Excel 2018
If you expand the “Full Biography" section of my profile you’ll find links to some articles I’ve written that may interest you including a new one concerning your Experts Exchange rank.
Marty - Microsoft MVP 2009 to 2017
Experts Exchange Most Valuable Expert (MVE) 2015, 2017
Experts Exchange Top Expert Visual Basic Classic 2012 to 2018
Experts Exchange Top Expert VBA 2018
Experts Exchange Distinguished Expert in Excel 2018
I know you've already accepted an answer for this but there is an option that doesn't need VBA.
You could use the Subtotal wizard on the data tab to do this. In order to insert a Subtotal the wizard adds a row after each change in whichever column you specify. In addition you get the Outline grouping with buttons in the row header margin to expand or collapse the groups.
If you don't want to keep the subtotals created it is easy to delete them, use a filter on that column to show rows that include "Subtotal" or "Count" depending on what was specified in the Subtotal wizard. You can then select all the cells in one go and press delete key, the hidden rows will not be affected.
You could use the Subtotal wizard on the data tab to do this. In order to insert a Subtotal the wizard adds a row after each change in whichever column you specify. In addition you get the Outline grouping with buttons in the row header margin to expand or collapse the groups.
If you don't want to keep the subtotals created it is easy to delete them, use a filter on that column to show rows that include "Subtotal" or "Count" depending on what was specified in the Subtotal wizard. You can then select all the cells in one go and press delete key, the hidden rows will not be affected.
Open in new window