I have an array of Months and Years (formatted Jan-16, Mar-17, etc) in a single row. I have a formula that will find the current month (based on the month and year I select in a drop-down menu) and spit out the address of that given month and year:
=CELL("address",INDEX(E3:BL3,MATCH(D1,E3:BL3,0))).
Works like a charm. Now I need to know how I can program a macro to look at the cell that contains the address and activate the cell whose address I am referencing.
So, for example, if the address that it spits out is Z3, the macro will then go and activate cell Z3. It needs to be dynamic because every month I will be referencing a new month and thus a new cell.
Assuming that your drop down is linked to cell
A1
then you can fire an event on a change on that cell that will move focus to cell address indicated in your formula (I'm assuming hereB1
). You would place on theWorkbook_SheetChange
event the following code: