MAcro to select number of colums

Closed
crisaldana123 - Sep 28, 2009 at 10:19 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Sep 28, 2009 at 09:24 PM
Hello,
I am trying to find a macro that will allow me to select a range of colums that increases each month

Ex.

Jan Feb Mar Apr

so the macro would select from january to each month of information as it becomes available.

I dunno the best way to do it. Probably assining a number to colun (Jan) and input the number of rows to the right to select???

Thank you in advance for your assistance, any additional info, please let me know.

1 response

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Sep 28, 2009 at 09:24 PM
The question needs rephrasing. I do not know what you want.

=column(a1)gives 1
=column (B1) gisves 2
=column(c1) gives 3 etc


if you want the last column number in the data
in vba
dim j as integer 
j=range("A1").end(xltoright).column


j gives the last column of data

study the difference between column(singular) and columns(plural) in help.
0