MarkCBB
Active Member
- Joined
- Apr 12, 2010
- Messages
- 497
Hello VBA pros,
I want to be able to copy a range on sheet2 using .currentRegion but exclude the heading by using OFFSET and then .end(xlup) to un select the blank row at the bottom.
I have a feeling this is possible, below is the line of code that excludes the heading row, but includes the blank row due to the OFFSET.
and here is the code that is not working, that is meant to exclude the blank row:
Below is the Code that pastes the data to an existing database (no challenges with this code just an fyi):
I want to be able to copy a range on sheet2 using .currentRegion but exclude the heading by using OFFSET and then .end(xlup) to un select the blank row at the bottom.
I have a feeling this is possible, below is the line of code that excludes the heading row, but includes the blank row due to the OFFSET.
Code:
Sheet2.Range("A1").CurrentRegion.Offset(1, 0).Copy
and here is the code that is not working, that is meant to exclude the blank row:
Code:
Sheet2.Range("A1").CurrentRegion.Offset(1, 0) , Sheet2.Range("A1").CurrentRegion.End(xlUp)).copy
Below is the Code that pastes the data to an existing database (no challenges with this code just an fyi):
Code:
Sheet1.Range("A" & WorksheetFunction.CountA(Sheet1.Columns("B:B")) + 1).PasteSpecial xlPasteValuesAndNumberFormats