Rolling Month Sales Lookup

MrDB4Excel

Active Member
Joined
Jan 29, 2004
Messages
334
Office Version
  1. 2013
Platform
  1. Windows
I do not understand why these formulas aren’t working.
This first Xl2bb mini sheet shown represents a bogus sales chart. Cell A2 is a Data Validation List.
When the month is changed in A2 then all the following Row 2 cells change according to the formulas you see in B2:L2 as shown in the second Xl2bb mini-sheet.
My formulas in A3 to L3 need to get the month name from A1 to L1 as the Data Validation List changes, but it does not work.
Does anyone have a notion why this is failing?
Also if a value in O2:O13 is 0.00 then the relevant cell in A3:L3 needs to remain blank.
Any help is much appreciated as I have spent the better part of 4 hours trying to make it work.

RollingMonthsTesting.xlsx
ABCDEFGHIJKLMNO
1JanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecemberMonth NameSales
2JanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecemberJanuary13,600.00
3#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/AFebruary21,029.31
4March19,651.96
5April12,164.48
6May9,601.00
7June18,552.00
8July15,351.00
9August16,747.49
10September11,851.28
11October12,662.00
12November15,095.75
13December0.00
RollingMonths
Cell Formulas
RangeFormula
A1:L1A1=A2
B2:L2B2=DATE(YEAR(A2),MONTH(A2)+1,1)
A3:L3A3=XLOOKUP(A1,$N$2:$N$13,$O$2:$O$13)
Named Ranges
NameRefers ToCells
lstMonths=RollingMonths!$A$2:$L$2B2, A1


RollingMonthsTesting.xlsx
ABCDEFGHIJKLMNO
1MarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecemberJanuaryFebruaryMonth NameSales
2MarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecemberJanuaryFebruaryJanuary13,600.00
3#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/AFebruary21,029.31
4March19,651.96
5April12,164.48
6May9,601.00
7June18,552.00
8July15,351.00
9August16,747.49
10September11,851.28
11October12,662.00
12November15,095.75
13December0.00
RollingMonths
Cell Formulas
RangeFormula
A1:L1A1=A2
B2:L2B2=DATE(YEAR(A2),MONTH(A2)+1,1)
A3:L3A3=XLOOKUP(A1,$N$2:$N$13,$O$2:$O$13)
Named Ranges
NameRefers ToCells
lstMonths=RollingMonths!$A$2:$L$2B2, A1
 
If vlookup works for you and xlookup works for me but not for you then it would mean a problem with the add in that you're using.

If you want that fixed then you would need to go back to whoever created the add in, that is not something that I can help with.
 
Upvote 0

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Thanks for all your help.
I get the feeling that it is this part: 1/(1/XLOOKUP that messes with it because all other instances of Xlookup work with my addin.
 
Upvote 0
I get the feeling that it is this part: 1/(1/XLOOKUP that messes with it because all other instances of Xlookup work with my addin.
If the xlookup is working then that part should work, the exception being if the sales amounts are not valid numbers, the easy way to test it is to try xlookup without that part (as you had in post 1).
Possibly the xlookup add in doesn't work correctly with dates, or the parameters are not the same as the proper version.
 
Upvote 0
I will just have to play around with it to see if I can get xlookup to work, otherwise vlookup will suffice.
Thanks again
 
Upvote 0

Forum statistics

Threads
1,214,383
Messages
6,119,198
Members
448,874
Latest member
Lancelots

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