Sumproduct #Value! Error due to Text

abusuzuki

New Member
Joined
Dec 30, 2022
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hello, I have this table as shown in the XL2BB, where I need to calculate the total amount of 2 columns : (C:D) based on date : column (B) , And I need to get the sum only ONCE at the last instance, I used the following sumif formula for that :
=IF(B2<>B3,SUM((D:E)*(--(B:B=B2))),"")
But the problem with this formula is that it displays Error value in place of the sum because there is text content in the field of sum, Is there any formula that has the same function as the above, but can sum the values with text in one of the sum range? Of course, I need the sum to show only once in the last instance and without repetition.

Book4.xlsx
F
3 
Sheet1
Cell Formulas
RangeFormula
F3F3=IF(B3<>B4,SUM((D:E)*(--(B:B=B3))),"")
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Book4.xlsx
ABCDEF
1No.dateinvoice numbercashchecktotal amount
2129/12/229315110 
3229/12/2293152check1000 
4329/12/229315310 
5429/12/229315410#VALUE!
6130/12/229315520 
7230/12/229315620 
8330/12/229315720 
9430/12/229315820 
10530/12/2293159check2000 
11630/12/229316020#VALUE!
12131/12/2293161 
13231/12/2293162 
14331/12/2293163 
15431/12/2293164#VALUE!
Sheet1
Cell Formulas
RangeFormula
F2:F15F2=IF(B2<>B3,SUM((D:E)*(--(B:B=B2))),"")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:E15,A1:B1,D1:F1,A16:B1048576,D16:F1048576,G:XFD,C:CExpression=$A1=1textNO
 
Upvote 0
The message stated SumProduct so I used Sumproduct formula .You did not show expected results so I showed the sum of the two columns.

SumProduct2022.xlsm
ABCDEF
1No.dateinvoice numbercashchecktotal amount
2129-Dec-229315110 
3229-Dec-2293152check1000 
4329-Dec-229315310 
5429-Dec-2293154101030
6130-Dec-229315520 
7230-Dec-229315620 
8330-Dec-229315720 
9430-Dec-229315820 
10530-Dec-2293159check2000 
11630-Dec-2293160202100
12131-Dec-2293161 
13231-Dec-2293162 
14331-Dec-2293163 
15431-Dec-22931640
6d
Cell Formulas
RangeFormula
F2:F4F2=IF(B2<>B3,SUM((D:E)*(--(B:B=B2))),"")
F5:F15F5=IF(B5<>B6,SUMPRODUCT(--($B$2:B5=B5),$E$2:E5)+SUMPRODUCT(--($B$2:B5=B5),$D$2:D5),"")
 
Upvote 0
With 365, try =IF(B5<>B6,SUM(IF($B$2:B5=B5,$D$2:E5)),"")

or with most versions of Excel and without entering formulas using Data Subtotals feature

It gives option for Grand Total, total by Day, and Totals for Cash and Cheques, and full details
I show with 2 Daily totals

SumProduct2022a.xlsm
ABCDEF
1No.dateinvoice numbercashchecktotal amount
629-Dec-22 Total3010001030
1330-Dec-22 Total10020002100
1831-Dec-22 Total000
19Grand Total13030003130
20
6e
Cell Formulas
RangeFormula
D18:F18,D6:F6D6=SUBTOTAL(9,D2:D5)
D13:F13D13=SUBTOTAL(9,D7:D12)
D19:F19D19=SUBTOTAL(9,D2:D17)
 
Last edited:
Upvote 0
Solution
I tested both functions and they both work as they should, and even the second formula works in Excel online. I think I will use the second formula because it is short, but I will keep both of them. Thank you very much Dave Patton. Now I will start my job in the year 2023 in a distinctive way.

Book4.xlsx
ABCDEF
1No.dateinvoice numbercashchecktotal amount
2129/12/229315110 
3229/12/2293152check1000 
4329/12/229315310 
5429/12/2293154101030
6130/12/229315520 
7230/12/229315620 
8330/12/229315720 
9430/12/229315820 
10530/12/2293159check2000 
11630/12/2293160202100
12131/12/2293161 
13231/12/2293162 
14331/12/2293163 
15431/12/22931640
Sheet1
Cell Formulas
RangeFormula
F2:F15F2=IF(B2<>B3,SUMPRODUCT(--($B$2:B2=B2),$E$2:E2)+SUMPRODUCT(--($B$2:B2=B2),$D$2:D2),"")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:E15,A1:B1,A16:B1048576,D16:F1048576,D1:XFD1,C:C,G12:XFD1048576,G2:G11,I2:XFD11Expression=$A1=1textNO
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,448
Members
448,966
Latest member
DannyC96

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