Lookup assistance needed please

formulacrazy

New Member
Joined
Jan 5, 2024
Messages
1
Platform
  1. Windows
So this is my data layout:

Sheet1

Row 3 are month names in the format of MMM.
Columns C to N contain various values.

Sheet 2 is an invoice template, which currently needs to be manually updated each month.

What i am trying to do is a Hlookup, looking at the invoice date and picking up the value for the pevious month on sheet on row 34.

I have tried =HLOOKUP("DEC",'sheet1'!C3:N36,34,False), and this works, however......what im trying to do is get the "DEC" bit to show the month before the invoice date automatically so it doesnt have to be manually updated each month (there are alot of these templates :( ). The invoice date in sheet 2 is in H5 of sheet 2 and is calcuated with=Today().

Appreciate HLookup may not be the best way to go, so a huge gold star to anyone who can help me, pretty please!
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Could you please update your profile to show what version of Excel you are using ? If you have MS365 or O2021 there will be more options.

The below should work for you.
Ideally you would also use a lookup to determine the row number rather than hard coding the 34 but we have no visibility of your data.
Excel Formula:
=HLOOKUP(TEXT(EOMONTH(H5,-1),"mmm"),Sheet1!$C$3:$N$36,34,FALSE)
 
Upvote 0

Forum statistics

Threads
1,224,890
Messages
6,181,612
Members
453,057
Latest member
LE102024

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