moradisndat
New Member
- Joined
- Feb 19, 2021
- Messages
- 15
- Office Version
- 2007
- Platform
- Windows
Using excel 2007. I started with range of 3 columns and about 26,000 rows. Then used data outline and group with subtotals ( rowlevels:=2 ) so that only the subtotals were visible.
Next, copied only the visible cells and pasted in new location. This new range of cells is G13:I28.
I am able to select the range with Range("G13").CurrentRegion.Select. But what I need to do is select H13:H28 and I13:I28.
I tried SpecialCells.xlCellTypeLastCell but it selects a blank cell around 26k rows since the imported data went that far.
I tried recording a macro to see what code to use when pressing ctrl+shift+down but it used specific cell reference H13:H28. It needs to be dynamic reference because the amount of records will vary each day. So how do I refer to the last cell in column H within that selected range? Please excuse me if the question is unclear. I'm just learning and dont know all the terms yet.
Next, copied only the visible cells and pasted in new location. This new range of cells is G13:I28.
I am able to select the range with Range("G13").CurrentRegion.Select. But what I need to do is select H13:H28 and I13:I28.
I tried SpecialCells.xlCellTypeLastCell but it selects a blank cell around 26k rows since the imported data went that far.
I tried recording a macro to see what code to use when pressing ctrl+shift+down but it used specific cell reference H13:H28. It needs to be dynamic reference because the amount of records will vary each day. So how do I refer to the last cell in column H within that selected range? Please excuse me if the question is unclear. I'm just learning and dont know all the terms yet.