1

I have a problem with VBA code. I have a sheet with a lot of data around the cells I want. I need to select data in column F, but the position of the first and last cells between the range is to be selected is changing up and down. I created the non empty cells in row X where there is no data do the LastRow function has any refernece but now I dont know how to select the first row

thx for help

1
  • Please add what you have done so far. Aug 7, 2014 at 8:47

1 Answer 1

1

If F1 is empty, this selects the first cell with data in the F column

Worksheets("Sheet1").Range("F1").End(xlDown).Select

If F1 may be non-empty you can add a check to see whether it contains text.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.