can anyone simplify this equation please?

englishdad

Board Regular
Joined
Mar 4, 2016
Messages
58
I'm thinking it could be done using a sumifs function but I can't get past the thinking stage! Any help, as always, is very much appreciated. Thanks in advance :)

SUMIF(C7:C41,"PAID",D7:D41)+SUMIF(F7:F41,"PAID",G7:G42)+SUMIF(I7:I41,"PAID",J7:J41)+SUMIF(L7:L41,"PAID",M7:M41)+SUMIF(O7:O41,"PAID",P7:P42)+SUMIF(R7:R41,"PAID",S7:S41)+SUMIF(U7:U41,"PAID",V7:V42)+SUMIF(X7:X41,"PAID",Y7:Y41)+SUMIF(AA7:AA41,"PAID",AB7:AB41)+SUMIF(AD7:AD41,"PAID",AE7:AE41)+SUMIF(AG7:AG41,"PAID",AH7:AH41)+SUMIF(AJ7:AJ41,"PAID",AK7:AK41)+SUMIF(AM7:AM41,"PAID",AN7:AN41)+SUMIF(AP7:AP41,"PAID",AQ7:AQ41)+SUMIF(AS7:AS41,"PAID",AT7:AT41)+SUMIF(AV7:AV41,"PAID",AW7:AW41)
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
See if this does the trick - confirm with ctrl+shift+enter:
=SUM(IF(MOD(COLUMN(C7:AV41),3)=0,IF(C7:AV41="PAID",IF(MOD(COLUMN(D7:AW41)-1,3)=0,D7:AV41))))

Had to edit the post - previous formula was incorrect.
 
Last edited:
Upvote 0
Hi TonyUK72, yes I did thanks, it's working a treat! njimack, I copied the formula above and I get #VALUE! for some reason???
 
Last edited:
Upvote 0
After you have entered the formula instead of pressing enter or clicking the tick, you have to press and hold ctrl + shift + enter. This is an ARRAY formula and that how you have to enter them.
 
Upvote 0
Instead of simply pressing enter when the formula is inserted.....press CTRL + SHIFT + ENTER
 
Upvote 0
That has indeed worked!! It's amazing what you find out on this forum, I had no idea about that! :cool: Very much appreciated njimack, thanks and I owe you a beer!

Perhaps you could help me with my final problem on the same sheet? As TonyUK72 mentioned above (and with the help of you guys on the forum), I have cells coloured depending on the 'age' of the 'due date' cell, so at the top of the sheet I have a summary of the number of cells (invoices) that are more than 7 days away from payment, within 7 days of payment, 1-7 days over, 8-14 days over and 15+ days over.

The above array function you created, adds up the paid invoices, but I'd also like to add up the totals in the same way for the above breaks. I've just tried substituting the "PAID" bit in the array formula with ">"&TODAY()+7), but it hasn't worked.

The code I have for the breaks above is as follows...

COUNTIF(B7:AY41,">"&TODAY()+7) for all 'current' invoices
COUNTIF(B7:AY41,">="&TODAY())-K4 for all invoices within 7 days of payment
COUNTIF(B7:AY41,"<"&TODAY())-COUNTIF(B7:AY41,"<40000")-O4-Q4 for invoices that are 1-7 days overdue
COUNTIF(B7:AY41,"<="&TODAY()-8)-COUNTIF(B7:AY41,"<40000")-Q4 for invoices that are 8-14 days overdue and
COUNTIF(B7:AY41,"<="&TODAY()-15)-COUNTIF(B7:AY41,"<40000") for 15+ days

Again any help greatly appreciated :)
 
Upvote 0
For robustness's sake, control+shift+enter, not just enter:

=SUM(IF(MOD(COLUMN(D7:AW41)-COLUMN(D7),3)=0,IF(C7:AV41="paid",D7:AW41)))
 
Upvote 0

Forum statistics

Threads
1,214,661
Messages
6,120,790
Members
448,994
Latest member
rohitsomani

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