zepharoz

New Member
Joined
Jul 5, 2023
Messages
11
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2016
  5. 2013
Platform
  1. Windows
Hi I'm looking for help on this formula. Tried looking for resources everywhere with no success. Please see the attached.
The goal is to calculate the YTD totals of all the months for each of the the respective employees (i.e. Bob, etc) and each category (i.e. Bonus, Salary, Gross, Tax)

I am currently using the formula: =SUMPRODUCT(IFERROR(SUMIFS(INDIRECT("'"&Sheets&"*'!b:b"),INDIRECT("'"&Sheets&"*'!a:a"),$A4),0))

Where Sheets is the named ranged for the months and the name of the respective sheets.
Column B are the bonuses
Column A are the names of the employee
$A4 is the criteria I am using.

After playing around for around 2 hours, it seems to only take in 1 sheet (or 1 month). I'm unsure where the issue is.
 

Attachments

  • sumproduct test file.jpg
    sumproduct test file.jpg
    58.9 KB · Views: 14
  • sumproduct test file2.jpg
    sumproduct test file2.jpg
    41.6 KB · Views: 13

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
@zepharoz
Would you be kind enough to use the xl2bb add in (link below) or post a table of your data. You do not give other months sheets? Do you want the forum to make this data up? That takes time and can lead to errors and misunderstanding.

But, to answer your question. I suggest you use Power Query to get your results. You can search any of the best YouTube Excel channels to get tutorials on Power Query.
Try: ExcelIsFun, Mr. Excel, My Online Training Hub, or Leila Gharani.

Here is an example of one:

 
Upvote 0
@zepharoz
Would you be kind enough to use the xl2bb add in (link below) or post a table of your data. You do not give other months sheets? Do you want the forum to make this data up? That takes time and can lead to errors and misunderstanding.

But, to answer your question. I suggest you use Power Query to get your results. You can search any of the best YouTube Excel channels to get tutorials on Power Query.
Try: ExcelIsFun, Mr. Excel, My Online Training Hub, or Leila Gharani.

Here is an example of one:


YTD sheet:
Formula at B4: =SUMPRODUCT(IFERROR(SUMIFS(INDIRECT("'"&Sheets&"*'!b:b"),INDIRECT("'"&Sheets&"*'!a:a"),$A4),0))


Sheets
YTDJan
NameBonusSalaryGrossTaxFeb
Bob
0​
0​
0​
0​
Mar
Marley
0​
0​
0​
0​
Apr
Francis
0​
0​
0​
0​
May
Deadpool
0​
0​
0​
0​

Jan and Feb are almost the same. Just changed some numbers to a few boxes to see if it was adding properly.
15-Jan-23​
NameBonusSalaryGrossTax
Bob
2000​
50000​
52000​
13000​
Marley
4500​
35000​
39500​
9875​
Francis
2400​
40000​
42400​
10600​
Deadpool
33000​
33333​
66333​
16583.25​
31-Jan-23​
BonusSalaryGrossTax
Bob
3100​
50000​
53100​
13275​
Marley
4500​
35000​
39500​
9875​
Francis
2400​
40000​
42400​
10600​
Deadpool
33000​
33333​
66333​
16583.25​

15-Feb-23​
NameBonusSalaryGrossTax
Bob
2000​
50000​
52000​
13000​
Marley
4500​
35000​
39500​
9875​
Francis
2400​
40000​
42400​
10600​
Deadpool
33000​
33333​
66333​
16583.25​
28-Feb-23​
BonusSalaryGrossTax
Bob
3100​
50001​
53101​
13275.25​
Marley
4500​
35000​
39500​
9875​
Francis
2400​
40000​
42400​
10600​
Deadpool
33000​
33333​
66333​
16583.25​
 
Upvote 0
But, to answer your question. I suggest you use Power Query to get your results.
I have seen it in action but I can't add anything to my work computer. Hopefully the information above is helpful
 
Upvote 0
Power Query is not an add in. It is part of Excel.
Have you watched the video(s)? It will take almost no time for you to learn the tool.
 
Upvote 0
So, I used power query to build this. It is not an excel add in it is part of excel. Please download for your use and experimentation.

 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,954
Members
449,095
Latest member
nmaske

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