A
aposatsk
My spreadsheet is as follows:
(1)XXXXXX|XXXXXXX|XXXXXXXX|XXXXXXX|XXXXXXX|XXXXXXXXX|XXXXX|
(2)XXXXXX|XXXXXXX|1-----------|2----------|3----------|XXXXXXXXX|XXXXX|
(3)XXXXXX|XXXXXXX|345453453|32434234|32434234|XXXXXXXXX|XXXXX|
(4)XXXXXX|XXXXXXX|654645644|12314356|61626536|XXXXXXXXX|XXXXX|
(5)XXXXXX|XXXXXXX|345453453|32434234|32434234|XXXXXXXXX|XXXXX|
(6)XXXXXX|XXXXXXX|345453453|32434234|32434234|XXXXXXXXX|XXXXX|
(7)XXXXXX|XXXXXXX|XXXXXXXX|XXXXXXX|XXXXXXX|XXXXXXXXX|XXXXX|
(8)XXXXXX|XXXXXXX|XXXXXXXX|XXXXXXX|XXXXXXX|XXXXXXXXX|XXXXX|
The XXXXXXX represents text in columns that are parallel to columns 1,
2, and 3.
My macro works with only Rows 2 to 6 and columns labelled 1, 2, 3. It
does many operations with these rows. *However*, when I add new rows,
the selection from say C2:C6 no longer works, since new rows have been
added. So, the selection C1:C6 has to be expanded to additional rows,
such as C1:C10.
HOW DO I ALLOW THE EXCEL MACRO TO RECOGNIZE WHICH ROWS HAVE BEEN ADDED,
AND THEN AUTOMATICALLY EXPAND EVERY SELECTION?
In other words, my spreadsheet has changed from:
(1)XXXXXX|XXXXXXX|XXXXXXXX|XXXXXXX|XXXXXXX|XXXXXXXXX|XXXXX|
(2)XXXXXX|XXXXXXX|1---------|2--------|3--------|XXXXXXXXX|XXXXX|
(3)XXXXXX|XXXXXXX|345453453|32434234|32434234|XXXXXXXXX|XXXXX|
(4)XXXXXX|XXXXXXX|654645644|12314356|61626536|XXXXXXXXX|XXXXX|
(5)XXXXXX|XXXXXXX|345453453|32434234|32434234|XXXXXXXXX|XXXXX|
(6)XXXXXX|XXXXXXX|345453453|32434234|32434234|XXXXXXXXX|XXXXX|
(7)XXXXXX|XXXXXXX|XXXXXXXX|XXXXXXX|XXXXXXX|XXXXXXXXX|XXXXX|
(8)XXXXXX|XXXXXXX|XXXXXXXX|XXXXXXX|XXXXXXX|XXXXXXXXX|XXXXX|
TO
(1)XXXXXX|XXXXXXX|XXXXXXXX|XXXXXXX|XXXXXXX|XXXXXXXXX|XXXXX|
(2)XXXXXX|XXXXXXX|1---------|2--------|3--------|XXXXXXXXX|XXXXX|
(3)XXXXXX|XXXXXXX|345453453|32434234|32434234|XXXXXXXXX|XXXXX|
(4)XXXXXX|XXXXXXX|654645644|12314356|61626536|XXXXXXXXX|XXXXX|
(5)XXXXXX|XXXXXXX|345453453|32434234|32434234|XXXXXXXXX|XXXXX|
(6)XXXXXX|XXXXXXX|345453453|32434234|32434234|XXXXXXXXX|XXXXX|
(7)XXXXXX|XXXXXXX|345476553|32486734|32434234|XXXXXXXXX|XXXXX|
(8)XXXXXX|XXXXXXX|345453453|32111234|32434234|XXXXXXXXX|XXXXX|
(9)XXXXXX|XXXXXXX|XXXXXXXX|XXXXXXX|XXXXXXX|XXXXXXXXX|XXXXX|
(10)XXXXX|XXXXXXX|XXXXXXXX|XXXXXXX|XXXXXXX|XXXXXXXXX|XXXXX|
And I need the macro to work with the newly added rows.
(1)XXXXXX|XXXXXXX|XXXXXXXX|XXXXXXX|XXXXXXX|XXXXXXXXX|XXXXX|
(2)XXXXXX|XXXXXXX|1-----------|2----------|3----------|XXXXXXXXX|XXXXX|
(3)XXXXXX|XXXXXXX|345453453|32434234|32434234|XXXXXXXXX|XXXXX|
(4)XXXXXX|XXXXXXX|654645644|12314356|61626536|XXXXXXXXX|XXXXX|
(5)XXXXXX|XXXXXXX|345453453|32434234|32434234|XXXXXXXXX|XXXXX|
(6)XXXXXX|XXXXXXX|345453453|32434234|32434234|XXXXXXXXX|XXXXX|
(7)XXXXXX|XXXXXXX|XXXXXXXX|XXXXXXX|XXXXXXX|XXXXXXXXX|XXXXX|
(8)XXXXXX|XXXXXXX|XXXXXXXX|XXXXXXX|XXXXXXX|XXXXXXXXX|XXXXX|
The XXXXXXX represents text in columns that are parallel to columns 1,
2, and 3.
My macro works with only Rows 2 to 6 and columns labelled 1, 2, 3. It
does many operations with these rows. *However*, when I add new rows,
the selection from say C2:C6 no longer works, since new rows have been
added. So, the selection C1:C6 has to be expanded to additional rows,
such as C1:C10.
HOW DO I ALLOW THE EXCEL MACRO TO RECOGNIZE WHICH ROWS HAVE BEEN ADDED,
AND THEN AUTOMATICALLY EXPAND EVERY SELECTION?
In other words, my spreadsheet has changed from:
(1)XXXXXX|XXXXXXX|XXXXXXXX|XXXXXXX|XXXXXXX|XXXXXXXXX|XXXXX|
(2)XXXXXX|XXXXXXX|1---------|2--------|3--------|XXXXXXXXX|XXXXX|
(3)XXXXXX|XXXXXXX|345453453|32434234|32434234|XXXXXXXXX|XXXXX|
(4)XXXXXX|XXXXXXX|654645644|12314356|61626536|XXXXXXXXX|XXXXX|
(5)XXXXXX|XXXXXXX|345453453|32434234|32434234|XXXXXXXXX|XXXXX|
(6)XXXXXX|XXXXXXX|345453453|32434234|32434234|XXXXXXXXX|XXXXX|
(7)XXXXXX|XXXXXXX|XXXXXXXX|XXXXXXX|XXXXXXX|XXXXXXXXX|XXXXX|
(8)XXXXXX|XXXXXXX|XXXXXXXX|XXXXXXX|XXXXXXX|XXXXXXXXX|XXXXX|
TO
(1)XXXXXX|XXXXXXX|XXXXXXXX|XXXXXXX|XXXXXXX|XXXXXXXXX|XXXXX|
(2)XXXXXX|XXXXXXX|1---------|2--------|3--------|XXXXXXXXX|XXXXX|
(3)XXXXXX|XXXXXXX|345453453|32434234|32434234|XXXXXXXXX|XXXXX|
(4)XXXXXX|XXXXXXX|654645644|12314356|61626536|XXXXXXXXX|XXXXX|
(5)XXXXXX|XXXXXXX|345453453|32434234|32434234|XXXXXXXXX|XXXXX|
(6)XXXXXX|XXXXXXX|345453453|32434234|32434234|XXXXXXXXX|XXXXX|
(7)XXXXXX|XXXXXXX|345476553|32486734|32434234|XXXXXXXXX|XXXXX|
(8)XXXXXX|XXXXXXX|345453453|32111234|32434234|XXXXXXXXX|XXXXX|
(9)XXXXXX|XXXXXXX|XXXXXXXX|XXXXXXX|XXXXXXX|XXXXXXXXX|XXXXX|
(10)XXXXX|XXXXXXX|XXXXXXXX|XXXXXXX|XXXXXXX|XXXXXXXXX|XXXXX|
And I need the macro to work with the newly added rows.