Suming and Subtracting

O_Junior

New Member
Joined
Oct 22, 2014
Messages
31
Hey guys,

I need some help. I need a formula that, sum from I7:I1000 if the cells A7:A1000 are filled with "RL1", and G7:G1000 are filled with TODAY() date, but i need to subtract the value of I7:I1000 if the cells J7:J1000 are filled with "OK". I don't know how to do that and I've been trying to come up with a solution for weeks now! Can someone help me?
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
I don't think you need to subtract anything, you just need to not include it in the sum since it's the same range:

If you are on XL2007 or higher:
=SUMIFS(I7:I1000,A7:A1000,"RL1",G7:G1000,TODAY(),J7:J1000,"<>OK")
 
Upvote 0
Try:

=SUMIFS(I7:I1000,A7:A1000,"RL1",G7:G1000,"="&TODAY())-SUMIF(J7:J1000,"OK",I7:I1000)

This will subtract the OKs regardless of whether or not column A = "RL1" and column G = today. Is that what you want?
 
Upvote 0
To include the TODAY() criteria on column G

=SUMIFS(I7:I1000,A7:A1000,"RL1",G7:G1000,TODAY(),J7:J1000,"<>OK")
 
Upvote 0
But if you don't include it at all there is no need to subtract, so only sum if J7:J1000 is NOT OK would accomplish the same thing.

=SUMIFS(I7:I1000,A7:A1000,"RL1",G7:G1000,TODAY(),J7:J1000,"<>OK")
 
Upvote 0
But if you don't include it at all there is no need to subtract, so only sum if J7:J1000 is NOT OK would accomplish the same thing.

=SUMIFS(I7:I1000,A7:A1000,"RL1",G7:G1000,TODAY(),J7:J1000,"<>OK")

I need to sum the column I7:I1000, because its the column that gives me the information about how many hours of work i have in that particular machine (RL1), and once a production order is finished, i'm going to put an OK in the column J7:J1000 so that hours is not counted anymore.
I hope i did myself clear. Sorry for the bad English
 
Upvote 0
and once a production order is finished, i'm going to put an OK in the column J7:J1000 so that hours is not counted anymore.
That's what the formula does.
If there is "OK" in J7:J1000, then the value in I7:I1000 is not counted in the sum.
 
Upvote 0

Forum statistics

Threads
1,215,465
Messages
6,124,982
Members
449,201
Latest member
Lunzwe73

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