Help with VBA Index Match.

LordH

New Member
Joined
Oct 14, 2014
Messages
2
Hi Everyone,

I've encountered a bit of a problem and would love some help with some coding & VBA .

I have a personal finance budget and I usually go through different months (cell F2 in overview sheet which I have since defined & named as "Period" ) to check things. This is a drop-down list. But I could be in Dec of last year and would like to easily go to the current month.

I need a VBA code that allows me to search through the pay periods (in relation to today's date) in first picture and insert that into the bit in blue (cell F2 or period in overview) .

I would normally use an excel function as per below but would rather have a macro that can input the relevant pay date into the cell E2 in Sheet "Overview".

I would normally use something like this in excel but not sure when it comes to vba.

" =INDEX(Table10[Period Date],MATCH(TODAY(),Table10[After Date],1)) "

any help would be greatly appreciated,



m2kkJ6

Capture.png



Capture2.png
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Forum statistics

Threads
1,223,712
Messages
6,174,031
Members
452,542
Latest member
Bricklin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top