lyp_sj


Hello,

How can I count # of columns between two specific columns such like, how many columns between column A and column D

Thanks so much!

B.regards/Yaping




Re: how can I count # of columns between two specific columns?

Andy Pope


Hi,

One way,

Msgbox Range("ABig Smile").Columns.Count

Although a lot depends on how you are currently identifying the 2 columns.





Re: how can I count # of columns between two specific columns?

magicalclick

The key is to get the column in integer value.

Range("A3").column will give you 1

Range("D321").column will give you 4

the row number doesn't matter.

you can figure out the rest since I don't know how you want to count it specifically.






Re: how can I count # of columns between two specific columns?

lyp_sj

Ok, thanks.

Is there any way to relax the dependency of idenrifying the columns

B.regards/Yaping