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 using a macro.
Is that possible?
Sample data below.
| Date | Account # |
| 12/8/2021 | 5500030 |
| 12/9/2021 | 8400084 |
| 12/10/2021 | 8400084 |
| 12/15/2021 | 5500061 |
| 12/16/2021 | 5800840 |
| 12/17/2021 | 5500061 |
| 12/17/2021 | 8400084 |
| 12/21/2021 | 5500061 |
| 12/22/2021 | 5500067 |
| 12/23/2021 | 5500061 |
| 12/23/2021 | 5500067 |
| 12/23/2021 | 8400084 |
| 12/23/2021 | 5500084 |
| 12/24/2021 | 5500061 |
| 12/27/2021 | 5500083 |
| 12/27/2021 | 5500067 |
| 12/28/2021 | 5500083 |
| 12/30/2021 | 5500083 |
| 12/31/2021 | 5500083 |
| 1/3/2022 | 5800815 |
| 1/3/2022 | 8400067 |
| 1/3/2022 | 5800815 |
| 1/3/2022 | 5800815 |
| 1/3/2022 | 5800815 |
| 1/3/2022 | 5800815 |
| 1/3/2022 | 5800815 |
| 1/3/2022 | 5800815 |
| 1/5/2022 | 5500061 |
| 1/6/2022 | 5500061 |
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.
14 Replies
- OliverScheurichGold Contributor
If you click the button in cell E1 in the attached file, is this what you want to do?
- LarryHarrison1988Copper 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.
- LarryHarrison1988Copper ContributorI tried it again and it worked like it is supposed to.