Finding a used / filled column

O

ogopogo5

Is there a way to wtite a VB that will look for a column that is used
/ filled? I.E. Colums A4, B4, C4 and D4 are empty. It will skips the
empty columns until it finds and selects an used / filled column, in
this case column E4.

Ogopogo5
 
J

Jim Thomlinson

this code assumes that the empty cells are not formulas returning empty
strings...

dim rng as range

set rng = range("a4")
if isempty(rng) then set rng = rng.end(xltoright)
rng.select
 
O

ogopogo5

Hi Jim
I copied and pasted the VB and it works. Thank you very much for helping
out.

Ogopogo5
 

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

Top