I receive a daily file of data and I need to highlight one of the columns and then perform operations on it. In the past the data would arrive in exactly the same format and the data was always in column G so I could use the following code:
Range(Range("G2"), Range("G" & Rows.Count).End(xlUp))
Now the order of columns varies and some data is completely omitted.
I can identify the column by it's title which is fine but then I have been unable to then select the column of data below it. I tried to define variables for the addresses of the top cell (which is the column title cell) and then do the same for the last cell of the data but i'm struggling have been racking my brains for a while now, any ideas pls?
Range(Range("G2"), Range("G" & Rows.Count).End(xlUp))
Now the order of columns varies and some data is completely omitted.
I can identify the column by it's title which is fine but then I have been unable to then select the column of data below it. I tried to define variables for the addresses of the top cell (which is the column title cell) and then do the same for the last cell of the data but i'm struggling have been racking my brains for a while now, any ideas pls?