Subtotal with formula not function

LisaCU

New Member
Joined
Sep 11, 2014
Messages
3
I have a spreadsheet which has 5 workbooks. The first workbook references the second via Vlookup primarily and the second references the first, third, fourth and fifth again using Vlookup. The second workbook contains almost 10,000 rows which represents 6 months data; the spreadsheet will need to be used cumulatively as it represents a reconciliation.

My problem is that I need to compare totals for individuals according to month; the easy way would be to use the Subtotal function but, unfortunately the spreadsheet appears to have to much data/too many calculations to enable the process to work and therefore I need a formula which will sum data in a list at the point that a reference number changes:

A Employee ID B Month C Amount Total for Month (Calc: =IF(AND(A2=A1,B2=B1),0,C2)

1235 1 25.00
1235 1 15.00 40.00
1235 2 25.00 25.00
1235 3 125.00 125.00
2569 2 25.00
2569 2 15.00 40.00
2569 3 300.00
2870 3 25.00 325.00

What I then need is a calculation that will give me a total for employee 1235 for months 1, 2 and 3 and then the same for the other employees.

I hope I have explained this in a way that makes sense and any help you can give will be much appreciated.

(really sorry but I can't get the columns to line up when I post the thread)
 
Last edited:

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Something like this will work.

=SUMIFS(C:C,A:A,1235,B:B,">=1",B:B,"<=3")

You can substitute the value 1235 with a cell reference that contains the value 1235.
 
Upvote 0
Something like this will work.

=SUMIFS(C:C,A:A,1235,B:B,">=1",B:B,"<=3")

You can substitute the value 1235 with a cell reference that contains the value 1235.

Thank you for taking the time to reply :) Unfortunately that won't work as I need the SumIF() to refer to a change in reference number rather than responding to a specific reference number i.e. I need a total for 1235 and then 2569 then 2870 and so on and the data file is several thousand rows. To add to the problem this is a reconciliation so the reference numbers will not necessarily be the same each time the reconciliation is done and the number of rows may well be different as well
 
Upvote 0
I should advice to use a pivot table for that kind of work.

Normally that would be perfect but I have to compare data in 2 workbooks - the smallest is 3000+ rows and 23 columns and the largest is 10,000+ rows and 26 columns
 
Upvote 0

Forum statistics

Threads
1,214,869
Messages
6,122,012
Members
449,060
Latest member
LinusJE

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