Hi there,
I have a drop-down with the 12 months of the year (Refer to the attached image - it's not much, but should paint a clear picture). Since we are in August, the Year to Date Actual Column ("YTD Actual") comes after the month we are in, i.e. to the right of it.
Depending on the month selected from a drop-down I want to somehow dynamically identify where the column with the "||" is (Column C in the picture), cut it from its current location (whichever one it may be), and paste it to the right of the column for the current month selected.
I need this to work going forward and backwards, therefore, a simple pre-recording will not work, I need some logic and code
Example walkthrough:
1) Open the spreadsheet for July, YTD Actual column is B:B
2) Select August from drop-down
3) Macro begins - Find where YTD Actual column is
4) Cut it
5) Paste it to where you can see it in the picture C:C
So my issues are:
1) How to search for "||" and select the column which has that cell and activate it (and be able to refer to it again for the next time I pick from the drop-down)
2) Cut it and Paste it after the month the drop-down is displaying
I have only as much experience with VB as much as someone who just read a VBA Book for Dummies.
Thank you very much for all your help
Microsoft Excel - Book1.png
Bookmarks