Forum Discussion
Mr_Raj_C
May 09, 2022Brass Contributor
Help with a formula for returning a value in a cell based on column heading & date
Dear Excel Community, I would appreciate your help with a problem i am trying to resolve. Please see the attached sheet for example. Date base formula So essentially i want to populate C...
- May 09, 2022Yes, the formula uses the TODAY function which obtains the date from your computer's date.
Patrick2788
May 09, 2022Silver Contributor
Try this:
=INDEX($A$2:$L$10,SEQUENCE(9),XMATCH(TEXT(TODAY(),"mmm"),$A$1:$L$1))
=INDEX($A$2:$L$10,SEQUENCE(9),XMATCH(TEXT(TODAY(),"mmm"),$A$1:$L$1))
Mr_Raj_C
May 09, 2022Brass Contributor
Hi Patrick,
Unfortunately that did not work. It came up with #NAME?.
When i checked the error, it said "Invalid Name Error". Assuming it didn't like something in the formula.
Unfortunately that did not work. It came up with #NAME?.
When i checked the error, it said "Invalid Name Error". Assuming it didn't like something in the formula.
- Patrick2788May 09, 2022Silver ContributorIt appears you're not on 365. You may use this instead and fill down:
=INDEX($A$2:$L$10,ROW()-1,MATCH(TEXT(TODAY(),"mmm"),$A$1:$L$1,0))- Mr_Raj_CJun 01, 2022Brass ContributorHi Patrick,
I hope you are well ? You kindly helped me with a formula for a problem i was was trying to overcome in excel.
I need to tweak the solution you provided but can't think of where to start. Are you kindly able to help again ?
Essentially, i want to modify the formula below to look back at the previous month instead of the current month. Can you advise / help ?
=INDEX($A$2:$L$10,ROW()-1,MATCH(TEXT(TODAY(),"mmm"),$A$1:$L$1,0))- Patrick2788Jun 01, 2022Silver ContributorHi Raj, slight change to the formula to pull previous month:
=INDEX($A$2:$L$10,ROW()-1,MATCH(TEXT(TODAY(),"mmm"),$A$1:$L$1,0)-1)
- Mr_Raj_CMay 09, 2022Brass ContributorFantastic Patrick, thanks for that, worked a treat.
Just to confirm, when the month changes to June, it will take data from the June column ?- Patrick2788May 09, 2022Silver ContributorYes, the formula uses the TODAY function which obtains the date from your computer's date.