Complex Vlookup "sumif" statement

amwilber

Board Regular
Joined
May 15, 2008
Messages
162
Hello I am building a tracking sheet for finance that will track savings over 10 fiscal years against our plan.

I have 1 sheet with our plan, a second sheet where I am tracking ongoing actual savings we capture.

What i was looking to do was create a sumif statement that would look at my savings sheet and easily count the totals by fiscal year.


Example:

Sheet 1 - Note that I am not showing all columns for sheet 1, I would want to repeat my "Actuals" out to 2030.

Spend CategoryForecast 2021Actuals 2021 VLOOKUP REQUIREDForecast 2022 ......
IT Savings$1,100,000$900,000
Marketing Savings$500,000$200,000



sheet 2 - In this sheet, "All" on fiscal year represents the full time horizon of my sheet 1 - so out to 2030.
Spend CategoryDescriptionFiscal YearTotal Savings
IT SavingsSaving 1ALL$1,000,000
IT SavingsSaving 22021$100,000
Marketing SavingsSaving 1ALL$100,000
Marketing SavingsSaving 2ALL$50,000

Marketing Savings

Saving 3
2023$50,000


Any help on how to best do that vlookup on sheet 1 that gets repeated across fiscal years would be greatly appreciated!
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
If I understand your details, your formula would look something like this. I have substituted the column headers for the column reference you'll need for the SUMIFS ranges. I broke it up into two SUMIFS,

One that sums the Total Savings column where the Spend Category in Sheet 2 matches Sheet 1, and the Fiscal Year in Sheet 2 matches the right four digits in the Sheet 1 header, and
Second, that sums Total Savings for the Spend Category if it's an ALL fiscal year savings.
You'll have to change some of my references to cell references since you haven't provided the Excel layout. Hope this is clear enough to decipher!

=SUMIFS('Sheet2'!Total Savings,Fiscal Year",right("Actuals 2021",4),'Sheet2'!"Spend Category","Spend Category")+SUMIFS('Sheet2'!Total Savings,Fiscal Year","ALL",'Sheet2'!"Spend Category","Spend Category")
 
Upvote 0
Hey there - thank you so much for answering.

I figured I'd make this a bit easier and remake the exact same example as above embedded.

I was a bit confused on altering the data a bit.

Book1
ABCDEFG
1Spend CategoryForecast 2021Actuals 2021 VLOOKUP REQUIREDForecast 2022Actuals 2022 VLOOKUP REQUIREDForecast 2023Actuals 2023 VLOOKUP REQUIRED
2IT Savings$1,100,000.00$ 1,100,000.00$2,100,000.00$ 900,000.00$ 2,200,000.00$ 900,000.00
3Marketing Savings$ 500,000.00$ 150,000.00$ 600,000.00$ 150,000.00$ 700,000.00$ 200,000.00
Synergy



Book1
ABCD
8Spend CategoryDescriptionFiscal YearTotal Savings
9IT SavingsSaving 1ALL$1,000,000
10IT SavingsSaving 22021$100,000
11Marketing SavingsSaving 1ALL$100,000
12Marketing SavingsSaving 2ALL$50,000
13Marketing SavingsSaving 32023$50,000
Actuals
 
Upvote 0
Hey there - thank you so much for answering.

I figured I'd make this a bit easier and remake the exact same example as above embedded.

I was a bit confused on altering the data a bit.

Book1
ABCDEFG
1Spend CategoryForecast 2021Actuals 2021 VLOOKUP REQUIREDForecast 2022Actuals 2022 VLOOKUP REQUIREDForecast 2023Actuals 2023 VLOOKUP REQUIRED
2IT Savings$1,100,000.00$ 1,100,000.00$2,100,000.00$ 900,000.00$ 2,200,000.00$ 900,000.00
3Marketing Savings$ 500,000.00$ 150,000.00$ 600,000.00$ 150,000.00$ 700,000.00$ 200,000.00
Synergy



Book1
ABCD
8Spend CategoryDescriptionFiscal YearTotal Savings
9IT SavingsSaving 1ALL$1,000,000
10IT SavingsSaving 22021$100,000
11Marketing SavingsSaving 1ALL$100,000
12Marketing SavingsSaving 2ALL$50,000
13Marketing SavingsSaving 32023$50,000
Actuals
 
Upvote 0
Hi, Unfortunately you did not upload your Excel sheet, you just pasted in the text and image, so it cannot be downloaded and modified. Try using the Upload Mini-Sheet button.
 
Upvote 0
amwilber

Don't understand how did you get 900K in E2 and G2. Could you elaborate?

M.
 
Upvote 0
I made no changes to anything you uploaded. Those are your numbers.
 
Upvote 0
I used the mini sheet copying all values this time - did this help?

Book2
ABCDEFGHI
1Spend CategoryForecast 2021Actuals 2021 VLOOKUP REQUIREDForecast 2022Actuals 2022 VLOOKUP REQUIREDForecast 2023Actuals 2023 VLOOKUP REQUIREDForecast 202….….
2IT Savings$ 1,100,000.00$ 1,100,000.00$ 2,100,000.00$ 1,000,000.00$ 2,200,000.00$ 1,000,000.00
3Marketing Savings$ 500,000.00$ 150,000.00$ 600,000.00$ 150,000.00$ 700,000.00$ 200,000.00
Sheet1
Cell Formulas
RangeFormula
C2C2=Sheet2!D2+Sheet2!D3
C3C3=Sheet2!D4+Sheet2!D5
E2E2=Sheet2!D2
E3E3=Sheet2!D4+Sheet2!D5
G2G2=Sheet2!D2
G3G3=Sheet2!D4+Sheet2!D5+Sheet2!D6



Book2
ABCD
1Spend CategoryDescriptionFiscal YearTotal Savings
2IT SavingsDescription 1ALL$ 1,000,000.00
3IT SavingsDescription 22021$ 100,000.00
4Marketing SavingsDescription 3ALL$ 100,000.00
5Marketing SavingsDescription 4ALL$ 50,000.00
6Marketing SavingsDescription 52023$ 50,000.00
Sheet2
 
Upvote 0

Forum statistics

Threads
1,223,884
Messages
6,175,175
Members
452,615
Latest member
bogeys2birdies

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