Totals based on conditionals

psycoperl

Active Member
Joined
Oct 23, 2007
Messages
338
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
  3. Web
I am working on a spreadsheet that I use to track Claim Submissions and Claim Payments.
What I am trying to do is in cell I1 to have the following: Total Spend Reimbursement (Claim Amounts (D) that have been marked as Received (F)) Sum of values in Column D where Column F="Y"
Currently I have the calculation in each row, but I just want to have one single value since it is not a number that is dependent on a specific row.


Claims Tracking.xlsx
DEFGHIJ
1$ 1,051.92$ 1,132.08
2 Amount Submitted DateReceived? Total Spend Spend Balance Spend Reimubsement Unallocated Reimbursement
3$ 100.002/13/23Y$ 100.00$ 371.66
4$ 30.002/13/23Y$ 130.00$ 341.66
5$ 16.002/13/23Y$ 146.00$ 325.66
6$ 30.002/13/23Y$ 176.00$ 295.66
7$ 24.382/13/23Y$ 200.38$ 271.28
8$ 30.002/13/23Y$ 230.38$ 241.28
9$ 30.002/13/23Y$ 260.38$ 211.28
10$ 20.002/13/23Y$ 280.38$ 191.28
11$ 2.292/13/23Y$ 282.67$ 188.99
12$ 125.002/13/23Y$ 407.67$ 63.99
13$ 1.492/13/23Y$ 409.16$ 62.50
14$ 32.082/20/2023 (Resub 4/16/2023)$ 409.16$ 62.50
15$ 37.502/25/23Y$ 446.66$ 25.00
16$ 25.002/25/23Y$ 471.66$ -
17$ 50.003/22/2023 (Resub 4/16/2023)$ 471.66$ -
18$ 30.003/22/2023 (Resub 4/16/2023)$ 471.66$ -
19$ 50.003/22/2023 (Resub 4/16/2023)$ 471.66$ -
20$ 12.503/22/23$ 471.66$ -
21$ 2.293/22/23$ 471.66$ -
22$ 21.593/22/23$ 471.66$ -
23$ 20.003/22/23$ 471.66$ -
24$ 200.004/16/23$ 471.66$ -
Claims
Cell Formulas
RangeFormula
G1G1=SUM(D:D)
H1H1=Settings!$B$3-Claims!G1
I3I3=0+IF(F3="Y",D3,0)
J3:J24J3=Settings!$B$5-Claims!I3
I4:I24I4=I3+IF(F4="Y",D4,0)
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Unless I'm missing something obvious, isn't just a simple Sumif?
Book1
DEFGHI
1890.12471.66
2 Amount Submitted DateReceived? Total Spend Spend Balance Spend Reimubsement
31002/13/23Y100
4302/13/23Y130
5162/13/23Y146
6302/13/23Y176
724.382/13/23Y200.38
8302/13/23Y230.38
9302/13/23Y260.38
10202/13/23Y280.38
112.292/13/23Y282.67
121252/13/23Y407.67
131.492/13/23Y409.16
1432.082/20/2023 (Resub 4/16/2023)409.16
1537.52/25/23Y446.66
16252/25/23Y471.66
17503/22/2023 (Resub 4/16/2023)471.66
18303/22/2023 (Resub 4/16/2023)471.66
19503/22/2023 (Resub 4/16/2023)471.66
2012.53/22/23471.66
212.293/22/23471.66
2221.593/22/23471.66
23203/22/23471.66
242004/16/23471.66
Sheet1
Cell Formulas
RangeFormula
G1G1=SUM(D:D)
I1I1=SUMIF(F:F,"Y",D:D)
I3I3=0+IF(F3="Y",D3,0)
I4:I24I4=I3+IF(F4="Y",D4,0)


or even just a Max? (taking the second row reference down to more rows than you're likely to need)
Book1
DEFGHI
1890.12471.66
2 Amount Submitted DateReceived? Total Spend Spend Balance Spend Reimubsement
31002/13/23Y100
4302/13/23Y130
5162/13/23Y146
6302/13/23Y176
724.382/13/23Y200.38
8302/13/23Y230.38
9302/13/23Y260.38
10202/13/23Y280.38
112.292/13/23Y282.67
121252/13/23Y407.67
131.492/13/23Y409.16
1432.082/20/2023 (Resub 4/16/2023)409.16
1537.52/25/23Y446.66
16252/25/23Y471.66
17503/22/2023 (Resub 4/16/2023)471.66
18303/22/2023 (Resub 4/16/2023)471.66
19503/22/2023 (Resub 4/16/2023)471.66
2012.53/22/23471.66
212.293/22/23471.66
2221.593/22/23471.66
23203/22/23471.66
242004/16/23471.66
Sheet1
Cell Formulas
RangeFormula
G1G1=SUM(D:D)
I1I1=MAX(I3:I1000)
I3I3=0+IF(F3="Y",D3,0)
I4:I24I4=I3+IF(F4="Y",D4,0)
 
Upvote 0
The idea is that I do not want to have the formulas on each row for column I. because if I add more and more rows, I have to make sure to carry the formulas over. I am trying to prevent that. I was able to achieve that with the other columns (G & H). However, I could not figure out how to add that conditional clause to do it in column I.
 
Upvote 0
So does the Sumif formula in I1 give you that?
 
Upvote 0
Solution

Forum statistics

Threads
1,215,167
Messages
6,123,401
Members
449,098
Latest member
ArturS75

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