Forum Discussion
LarryHarrison1988
Jan 07, 2022Copper Contributor
Need to add blank lines
I am using Excel out of Office 360. I need to sort a table with dates and account numbers. I need to sort by the account numbers, then add a blank line between the different group of account numbers...
- Jan 08, 2022
Maybe like in the attached file if you click the button in cell K1. The data is already sorted by column E and the macro executes the insertion of blank rows according to the groups in column E.
LarryHarrison1988
Jan 07, 2022Copper Contributor
When I clicked on the button, it sorted the table and added lines between the different numbers, then also copied the information into several cells to the right.
LarryHarrison1988
Jan 07, 2022Copper Contributor
I tried it again and it worked like it is supposed to.
- LarryHarrison1988Jan 07, 2022Copper ContributorIf I want to use the macro on a larger table, what do I need to edit?
- OliverScheurichJan 07, 2022Gold Contributor
Key:=Range("B2:B46" _
.SetRange Range("A1:B46")
For i = 2 To 100
Edit the ranges and the upper value in the for statement of the macro according to your requirements.
I tried the attached example with 2000 rows and it works as intended in my spreadsheet after i edited the ranges and the upper value of the macro.
- LarryHarrison1988Jan 07, 2022Copper Contributor
How can I submit my file for a better example?
I have done the sort and added your text below "End With"
Do I need to edit any of that?