SUMIFS Leading Zeros & Dual Conditional Statement

genheals

New Member
Joined
Jan 21, 2017
Messages
4
Hello,

I have an issue with a SUMIFS formula that I am using in a spreadsheet. The idea is to take a column of data called "Reference Number", paste this column into a new column and make it unique, using the Excel data duplication removal feature. I then want to take a conditional summation for each UNIQUE reference number. These are account numbers, so the leading zeros are relevant and must be preserved. I also want to have a condition that any Debit Amount less than or equal to 2 is not included in the conditional summation for each reference number.

The problem is that SUMIFS does not recognize leading zeros, and is instead ignoring these zeros and generating an inaccurate summation. Solutions online are suggesting SUMPRODUCT, but I am not sure how to have dual IF statements in that formula.

I have insert a section of the spreadsheet below for more clarity.

Thank you for any help!




SOURCE DATA TABLE
Reference NumberDebit AmountCredit Amount
0012700.000.00
012769.230.00
11192.310.00
0021192.310.00
022.000.00
21050.000.00
0031050.000.00
030.001923.08
30.980.00
31.000.00
31.000.00
2961.540.00
2961.540.00
11230.770.00

<tbody>
</tbody>




CONDITIONAL SUMMATION TABLE (INCORRECT - NO FORMULAS)
Reference NumberDebitCreditTotal
0017892.3107892.31
017892.3107892.31
17892.3107892.31
0024165.3904165.39
024165.3904165.39
24165.3904165.39
00310501923.08-873.08
0310501923.08-873.08
310501923.08-873.08

<tbody>
</tbody>




CONDITIONAL SUMMATION TABLE (INCORRECT - FORMULAS)
Reference NumberDebitCreditTotal
001=SUMIFS($B:$B,$A:$A,E2,$B:$B,">2")=SUMIFS($C:$C,$A:$A,E2)=F2-G2
01=SUMIFS($B:$B,$A:$A,E3,$B:$B,">2")=SUMIFS($C:$C,$A:$A,E3)=F3-G3
1=SUMIFS($B:$B,$A:$A,E4,$B:$B,">2")=SUMIFS($C:$C,$A:$A,E4)=F4-G4
002=SUMIFS($B:$B,$A:$A,E5,$B:$B,">2")=SUMIFS($C:$C,$A:$A,E5)=F5-G5
02=SUMIFS($B:$B,$A:$A,E6,$B:$B,">2")=SUMIFS($C:$C,$A:$A,E6)=F6-G6
2=SUMIFS($B:$B,$A:$A,E7,$B:$B,">2")=SUMIFS($C:$C,$A:$A,E7)=F7-G7
003=SUMIFS($B:$B,$A:$A,E8,$B:$B,">2")=SUMIFS($C:$C,$A:$A,E8)=F8-G8
03=SUMIFS($B:$B,$A:$A,E9,$B:$B,">2")=SUMIFS($C:$C,$A:$A,E9)=F9-G9
3=SUMIFS($B:$B,$A:$A,E10,$B:$B,">2")=SUMIFS($C:$C,$A:$A,E10)=F10-G10

<tbody>
</tbody>
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,214,641
Messages
6,120,693
Members
448,979
Latest member
DET4492

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