Sumifs based on criteria in line with value to be summed

Bub1029

New Member
Joined
Jun 25, 2020
Messages
12
Office Version
  1. 2016
Platform
  1. Windows
Hi Every one,

I need to create a sumifs formula to capture information based on a number of pieces of criteria. Two of those criteria are very easy to gather, but the final piece is much more difficult to capture accurately.
1) The sum of values needs to be associated with values present in a specific row which is easily accomplished by setting the sum range to an index match within the data tab.
2) Only values that have "Amount Due" listed in row 2 of the column the value is in should be considered which is also accomplished quickly by setting one criteria to search that range for that criteria.
3) Contained within the horizontal area that has the value to be summed is the date that it is expected to be collected. This date is 2 cells to the right of the value to be included in the sum and needs to be the same month and year as the month represented in the sum table

Is it possible to get a formula together to make this process automated? Let me know if you think this is possible and how you might approach it or if I need to completely reformat my table in some way:

Book1
ABCDEFGHIJKLMNOPQRS
1$ 13,123,596.55$ 19,500.00Aug-21$ 26,804,111.22$ 5,179,549.10Mar-22$ 13,123,596.55$ 19,500.00Aug-21
2Project Number Total Billing Amount Due CommentsExpected/Committed Payment DatePayment Receipt DatePaid? Total Billing Amount Due Expected Payment Date/CommentsExpected/Committed Payment DatePayment Receipt DatePaid? Total Billing Amount Due CommentsExpected/Committed Payment DatePayment Receipt DatePaid?
31$ 23,154.80$ -$ 23,154.805/17/2022x$ -$ 23,154.806/25/2022$ 23,154.80$ -$ 23,154.805/1/2022x
42$ -$ -$ -
53$ -$ 6,197.97$ 6,197.975/15/2022$ -
64$ -$ -$ -
75$ -$ -$ -
Data Sheet

May 2022 Active Projects List and Open Billings Cash Flow Working Copy.xlsx
ABCDEFGHIJKLMN
1Project Number Outstanding Progress Billing Total May-22Jun-22Jul-22Aug-22Sep-22Oct-22
2Expected Collection TotalActual ReceiptsExpected Collection TotalActual ReceiptsExpected Collection TotalActual ReceiptsExpected Collection TotalActual ReceiptsExpected Collection TotalActual ReceiptsExpected Collection TotalActual Receipts
31#N/A#N/A
42#N/A
53#N/A
64#N/A
Progress Billing Cash Flow
Cell Formulas
RangeFormula
C3C3=SUMIFS(INDEX('Active Projects & Cash Flow'!$1:$653,MATCH('Progress Billing Cash Flow'!A3,'Active Projects & Cash Flow'!$A:$A,0),),'Active Projects & Cash Flow'!2:2,"Amount Due",INDEX('Active Projects & Cash Flow'!1:653,,MATCH("Expected/Committed Payment Date",'Active Projects & Cash Flow'!2:2,0)),'Progress Billing Cash Flow'!C1)
B3:B6B3=SUMIF('Active Projects & Cash Flow'!$2:$2,"Amount Due",INDEX('Active Projects & Cash Flow'!$1:$653,MATCH('Progress Billing Cash Flow'!A3,'Active Projects & Cash Flow'!$A:$A,0),))
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Your attempted formulas use 'Active Projects & Cash Flow' but you have shown no such sheet. Is it the 'Data Sheet' that you have shown?

If so, for the sample data shown, can you fill in the expected results manually and post that again with any further explanation about how you got the results manually?

BTW, it is a bad idea to use the sheet name that the formula is on within the formula itself ('Progress Billing Cash Flow'). It is not needed and can lead to errors under some circumstances.
 
Upvote 0
Hi Peter, those formulas were entered by mistake on this page. I meant to paste without formulas just to show what the concept was.
 
Upvote 0
Sorry, I misread that bit. Here's what should generate in the Cash flow table once the formula is in. I used Project 1 as the example line:

Book1
ABCDEFGH
1Project Number Outstanding Progress Billing Total May-22Jun-22Jul-22
2Expected Collection TotalActual ReceiptsExpected Collection TotalActual ReceiptsExpected Collection TotalActual Receipts
31$ -$ 46,309.60$ 23,154.80
42$ -
53$ -
Sheet1



Book1
ABCDEFGHIJKLMNOPQRS
1Project Number$ 23,154.80$ 23,154.80Mar-22$ 23,154.80$ 23,154.80Apr-22$ 23,154.80$ 23,154.80May-22
2 Total Billing Amount Due Expected Payment Date/CommentsExpected/Committed Payment DatePayment Receipt DatePaid? Total Billing Amount Due Expected Payment Date/CommentsExpected/Committed Payment DatePayment Receipt DatePaid? Total Billing Amount Due Expected Payment Date/CommentsExpected/Committed Payment DatePayment Receipt DatePaid?
31$ 23,154.80$ 23,154.805/15/2022$ 23,154.80$ 23,154.805/28/2022$ 23,154.80$ 23,154.806/14/2022
42$ -
53
Sheet2


The total in "Expected Collection Total" by Project Number 1 in Sheet1 is based on the presence of the month and year referenced under "Expected Payment Date/Comments" in Sheet2 next to the total for "Amount De"
 
Upvote 0
If I have understood correctly, you have a somewhat complicated layout to extract that information. Is it this?

Bub1029.xlsm
ABCDEFGH
1Project Number Outstanding Progress Billing Total May-22Jun-22Jul-22
2Expected Collection TotalActual ReceiptsExpected Collection TotalActual ReceiptsExpected Collection TotalActual Receipts
3146309.623154.80
Sheet1
Cell Formulas
RangeFormula
C3,G3,E3C3=SUMPRODUCT(--(RIGHT(Sheet2!$D$2:$S$2,8)="Comments"),--(TEXT(Sheet2!$D$3:$S$3,"mmyy")=TEXT(C$1,"mmyy")),INDEX(Sheet2!$C$3:$R$5,MATCH($A3,Sheet2!$A$3:$A$5,0),0))+SUMPRODUCT(--(RIGHT(Sheet2!$E$2:$S$2,8)="ent Date"),--(TEXT(Sheet2!$E$3:$S$3,"mmyy")=TEXT(C$1,"mmyy")),INDEX(Sheet2!$C$3:$Q$5,MATCH($A3,Sheet2!$A$3:$A$5,0),0))
 
Upvote 0
Thanks for your help Peter. I tried entering your formula into my main sheet with the adjustments to the data ranges it will need to apply to, but I had some troubles getting any values to generate. I'm sure there's some idosyncracies I translated incorrectly because the actual sheet I'm using needs to cover a very large range and what I put together for here was for theory crafting since xlbb has a size limit.

May 2022 Active Projects List and Open Billings Cash Flow Working Copy.xlsx
ABCDEFGHIJ
1Project Number Outstanding Progress Billing Total May-22Jun-22Jul-22Aug-22
2Expected Collection TotalActual ReceiptsExpected Collection TotalActual ReceiptsExpected Collection TotalActual ReceiptsExpected Collection TotalActual Receipts
3582$ 148,639.32#VALUE!
4585$ -
51466-1$ 6,197.97
Progress Billing Cash Flow
Cell Formulas
RangeFormula
C3C3=SUMPRODUCT(--(RIGHT('Active Projects & Cash Flow'!$Z$2:$TW$2,8)="Comments"),--(TEXT('Active Projects & Cash Flow'!$Z$3:$TW$3,"mmyy")=TEXT(C$1,"mmyy")),INDEX('Active Projects & Cash Flow'!$AA$3:$TW$653,MATCH($A3,'Active Projects & Cash Flow'!$A$3:$A$653,0),0))+SUMPRODUCT(--(RIGHT('Active Projects & Cash Flow'!$AG$2:$TW$2,8)="ent Date"),--(TEXT('Active Projects & Cash Flow'!$Z$3:$TW$3,"mmyy")=TEXT(C$1,"mmyy")),INDEX('Active Projects & Cash Flow'!$AA$3:$TW$653,MATCH($A3,'Active Projects & Cash Flow'!$A$3:$A$653,0),0))
B3:B5B3=SUMIF('Active Projects & Cash Flow'!$2:$2,"Amount Due",INDEX('Active Projects & Cash Flow'!$1:$653,MATCH('Progress Billing Cash Flow'!A3,'Active Projects & Cash Flow'!$A:$A,0),))
 
Upvote 0
Sorry, I'm afraid that I am not able to determine what is wrong with your conversion. :(
 
Upvote 0
Sorry, I'm afraid that I am not able to determine what is wrong with your conversion. :(
Hi Peter,

Thanks for all your help trying to work this out. I'm finding that the easiest path to take on this is just to change the direction that I'm storing my data. Instead of pulling information from the "Active Projects List and Cash Flow" tab, I'll just pull information into that from a master data table with all the details of each individual billing. I was trying to simplify things in the wrong order and it made a mess of every thing. I hope you're doing well! Thank you!
 
Upvote 0
Cheers, thanks for the update. A fresh approach is often a good idea. :)
 
Upvote 0

Forum statistics

Threads
1,223,229
Messages
6,170,881
Members
452,364
Latest member
springate

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