subtracting values based on time remaining

andrewb90

Well-known Member
Joined
Dec 16, 2009
Messages
1,077
Hello all,

I feel like I'm just slightly off on this formula: I am trying to sum a range of values, then subtract the total of all values where the time remaining is less that 1 year.

Code:
=(SUMIF(K3:K22,"<>"&"",D3:D22))-(SUMIF(K3:K22,[COLOR=#b22222]"<365"[/COLOR] &"",D3:D22))

=(SUMIF(K3:K22,"<>"&"",D3:D22))-(SUMIF(K3:K22,"GONE!" &"",D3:D22))
The second formula works perfect for removing data where the cell in Column K reflects Gone since there are no more days remaining.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
What is the problem and what is the purpose of the &"" in the formula?

What is in column K and how are the values getting in that column?
 
Upvote 0
Here is the formula in K:
Code:
=IF(B3>F3,"GONE!",INT((F3-B3)/365)&"Y  "&INT(MOD((F3-B3),365)/30)&"M  "&ROUND(MOD((MOD((F3-B3),365)),30),0)&"D")

F3 & B3 are simple date values:ex 12/03/17
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,314
Members
452,634
Latest member
cpostell

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