Selecting the first non blank cell in Range

  • Thread starter Thread starter VBA Noob
  • Start date Start date
V

VBA Noob

Hi,

Is the only way to select the first non blank cell in a range to use a
if statement.

e.g If D1 is the first cell in range A1 to F1 with info I want t
return 1 for A to for B and so on. So D1 would return 4

VBA Noo
 
Perhaps

MsgBox Range("A1").End(xlToRight).Offset(0, 1).Column


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top