Determine the year and month from a column and row and lookup sheet to return value?

anonemous

New Member
Joined
Dec 2, 2015
Messages
16
Office Version
  1. 365
  2. 2016
  3. 2010
Platform
  1. Windows
  2. MacOS
I have a master spreadsheet where every month I insert a new column of data and it shifts the rest of the older data/months to the right (instead of going to the end of the sheet). Each month of counts is input into that sheet.
There is a second sheet where I'd like to make a table of the info from above, but in a more compact form.

Of course I could do this and copy and paste manually but I'd like to get excel to read it and return what it looks up.
I thought about using vlookup but I can't think of a way to write it for excel to match the year and month from reading the table correctly.

Bonus side question of a way to determine a running year to date count by adding summing the previous months for a year to date snapshot.

Thank you for reading, I always appreciate the insight gained from knowledge on this forum.

Data sheet:
MrExcel.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAU
1TypesOct-21Sep-21Aug-21Jul-21Jun-21May-21Apr-21Mar-21Feb-21Jan-21Dec-20Nov-20Oct-20Sep-20Aug-20Jul-20Jun-20May-20Apr-20Mar-20Feb-20Jan-20Dec-19Nov-19Oct-19Sep-19Aug-19Jul-19Jun-19May-19Apr-19Mar-19Feb-19Jan-19Dec-18Nov-18Oct-18Sep-18Aug-18Jul-18Jun-18May-18Apr-18Mar-18Feb-18Jan-18
2Oranges3012882541231902661415874118672521992148113230416926710130420615717211019828419615121923019931702151022133859261295222226930123
3Apples312923528618121218813228386199189124116184266185417818526819289330317024030267218107515313314140103931943031373003021022573
Sheet1


Tally sheet (the numbers are filled in and the formula should output to these values)

MrExcel.xlsx
ABCDEFGHIJKLMN
1ApplesJanFebMarAprMayJunJulAugSepOctNovDecYear Total
2CY 20218628313218821218128635923121807
3CY 20201926818517841852661841161241891991917
4CY 201928933031702403026721810751531331819
5YTD 20218636950168990110821368140314951807-
6YTD 202019287472650654839110512891405152917181917-
7YTD 2019281214245948341136120314211528153316861819-
8
9
10OrangesJanFebMarAprMayJunJulAugSepOctNovDecYear Total
11CY 202111874158142661901232542883011786
12CY 202020630410126716930413281214199252672296
13CY 201917093192302191511962841981101721571999
14YTD 20211181923503646308209431197148517861786
15YTD 2020206510611878104713511483156417781977222922962296
16YTD 20191702632825127318821078136215601670184219991999
Tally
Cell Formulas
RangeFormula
N2:N4,N11:N13N2=SUM(B2:M2)
B14:B16,B5:B7B5=B2
C5:K5,C15:M16,C14:K14,C6:M7C5=B5+C2
N14:N16N14=SUM(B11:M11)
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Maybe:

Cell Formulas
RangeFormula
B2:M4B2=IFERROR(HLOOKUP(DATE(RIGHT($A2,4),MONTH(B$1),1),Sheet1!$1:$10,MATCH($A$1,Sheet1!$A$1:$A$10,0),0),"")
N2:N4,N11:N13N2=SUM(B2:M2)
B5:M7,B14:M16B5=IF(B2="","",SUM($B2:B2))
B11:M13B11=IFERROR(HLOOKUP(DATE(RIGHT($A11,4),MONTH(B$1),1),Sheet1!$1:$10,MATCH($A$10,Sheet1!$A$1:$A$10,0),0),"")
 
Upvote 0
Solution

Forum statistics

Threads
1,214,649
Messages
6,120,728
Members
448,987
Latest member
marion_davis

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