Lookup with Date

JTL9161

Well-known Member
Joined
Aug 29, 2012
Messages
593
Office Version
  1. 365
Platform
  1. Windows
I have dates in column A (Worksheet2021) with total in Col B and Average in Col C. I am trying to refererence each Week's average versus each Week from this year. I will have an Week1 Average for 2022 in Col A on another (Worksheet2022) and want to pull the coorisponding Average from 2021 and want the Week1 average from the 2021 worksheet

Worksheet2021
Dates # Avg.
04/26/21 79
79.00 Week1
05/10/21 71
75.00 Week3
05/24/21 69
73.00 Week5

04/19/21 70 70.00 Week2
05/03/21 72
71.00 Week4
05/17/21 79
73.67 Week6

End Result
Worksheet2022
2022 Avg
2021 Avg
04/27/22 77 77.00 79.00 Week1
05/11/22 70 73.50
75.00 Week3
05/25/22 74 73.66
73.00 Week5

04/20/22 69 69.00
70.00 Week2
05/04/22 73 71.00
71.00 Week4
05/18/22 74 72.00
73.67 Week6

Need the Lookup(?) formula on Worksheet2022 that will take the appropriate Average from the 2021 worksheet to the 2022 worksheet.

Thank you,
James
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
this works using the week names as the common factor to compare to. let me know if this works for you.
---------------
2021
Book1
ABCD
1Dates#Avg.
24/26/20217979.00 Week1
35/10/20217175.00 Week3
45/24/20216973.00 Week5
5
64/19/20217070.00 Week2
75/3/20217271.00 Week4
85/17/20217973.67 Week6
2021
Cell Formulas
RangeFormula
C2,C6C2=AVERAGE(B2)
C3,C7C3=AVERAGE(B2:B3)
C4,C8C4=AVERAGE(B2:B4)

---------------
2022
Book1
ABCDE
1Dates#2022 Avg2021 Avg
24/27/20227777.0079.00 Week1
35/11/20227073.5075.00 Week3
45/25/20227473.6773.00 Week5
5
64/20/20226969.0070.00 Week2
75/4/20227371.0071.00 Week4
85/18/20227472.0073.67 Week6
2022
Cell Formulas
RangeFormula
C2,C6C2=AVERAGE(B2)
D2:D4,D6:D8D2=VLOOKUP(E2,CHOOSE({1,2},'2021'!D:D,'2021'!C:C),2,0)
C3,C7C3=AVERAGE(B2:B3)
C4,C8C4=AVERAGE(B2:B4)
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,293
Members
452,902
Latest member
Knuddeluff

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