Could anyone please tell me the formula that I will need in my macro to move to the next column (up one letter) for the next time I run the macro witout me having to manually change column the letter?
Thanks Nunzio
Could anyone please tell me the formula that I will need in my macro to move to the next column (up one letter) for the next time I run the macro witout me having to manually change column the letter?
Thanks Nunzio
Hi,
If you explained what you are doing you would get a more accurate answer.
You could try
To move to the next cell
or to select the next column![]()
Please Login or Register to view this content.
VBA Noob![]()
Please Login or Register to view this content.
_________________________________________
![]()
![]()
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
Here is my macro, after the macro is completed I would like it to go to next column which in this case would J and K etc. Move up one column each time it is run. There are three separate ranges for the current column I.
![]()
Please Login or Register to view this content.
Last edited by VBA Noob; 03-24-2007 at 04:24 PM.
Please read forum rules below and then wrap yor code
VBA Noob
I am sorry I don't understand
Read the link.
you basically enter [code]at the start of thr code and then [code] at the end. However the last [code] has and / between the [ and the letter c.
or when composing your post you can you use the # symbol on the toolbar
VBA Noob
Is this ok?
![]()
Please Login or Register to view this content.
Yes. Thank you
I think this might work
VBA Noob![]()
Please Login or Register to view this content.
Thanks but I could not get it to work. Starting in column d I need to move one column at a time all the way to ak.
Thanks Nunzio
What happened ??
If it's just the wrong columns then amended
to![]()
Please Login or Register to view this content.
VBA Noob![]()
Please Login or Register to view this content.
Ok were getting somewhere the macro is running now but what I need to to do start in column 4 which is a fiscal week read it and stop and than the next time I run it read column 5 which is the next fiscal week and stop etc.
Thanks Rick
Nunzio
VBA Noob has asked me to provide some assistance to your problem
I assume by your discription you will be running the macro weekly.
To keep track of what column that the macro last used the macro will need to store the column number. The easiest way to do this is in a cell of a spreadsheet. Is there a cell on an existing sheet that the macro can use or is it possible to add another sheet that the macro can use.
Another option is if the macro is being run weekly or some other regular interval the macro could be coded to calculate the column number base on the date it was run. would need to know the date that column 4 was for.
Please Read Forum Rules Before Posting
Wrap VBA code by selecting the code and clicking the # icon or Read This
How To Cross Post politely
Top Excel links for beginners to Experts
If you are pleased with a member's answer then use the Scales icon to rate it
If my reply has assistedor failed to assist you
I welcome your Feedback.
Sure row # 1 is available in each column.
Thanks Nunzio
Try this modification
I have coded it to use ak1 to track last used column number. if ak1 is blank or less than 4 macro will start at column 4. if value in ak1 is greater than 3 it adds 1 to the value in ak1 and uses that value.
After macro has run it updates entry in AK1
![]()
Please Login or Register to view this content.
I just wanted to thank you guy's very much your the best and very smart at that.
Nunzio
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks