VBA - offset rows from bottom data - select above rows in column

gonsped

New Member
Joined
Aug 22, 2017
Messages
3
I have a variety of data dumps that fill column A only (varies from 30-50 data points/rows).

The data dump starts on cell A5.

Unfortunately the data dumps provide unwanted data on the last of 3 rows - every data dump.

How do I select the rows from A5 to the last data point? The last 3 rows I do not want to copy.

I am able to use OFFSET to jump to a cell - but I am unable to string together offset command with the following code:

VBA Code:
Range("A5").Select
    Range(Selection, Selection.End(xlDown)).Select

The above code is able to copy from A5 right down the last data (includes the last 3 rows I don't need).
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
VBA Code:
Range("A5").Select
Range(Selection, Selection.End(xlDown).Offset(0 - 3)).Select

Or :
VBA Code:
Range([A5], [A5].End(4)(-2)).Select
 
Upvote 0

Forum statistics

Threads
1,214,593
Messages
6,120,434
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top