sum formula based on criteria

stacylena

New Member
Joined
May 5, 2015
Messages
12
This newbie would appreciate your help! I need a formula to add data in cell e3 with I3 if cell b3 and F3 says DTH and put results in J3.
Thanks!
 
Last edited:

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Enter the following formula into J3:

=IF(AND(B3="dth", F3="dth"), E3+I3, "")

That returns the null string ("") if the conditions are not met. You neglected to say what to do in that case.

Note: Replace commas (",") with semicolons (";") if that is what you use in your region to separate function parameters.
 
Upvote 0
Enter the following formula into J3:

=IF(AND(B3="dth", F3="dth"), E3+I3, "")

That returns the null string ("") if the conditions are not met. You neglected to say what to do in that case.

Note: Replace commas (",") with semicolons (";") if that is what you use in your region to separate function parameters.

Thanks for your help. If b3 and/or F3 do not say "dth" I don't want anything to appear in the cell or it could say 0. When I try to enter the formula you suggested, I get an error message.
 
Last edited by a moderator:
Upvote 0
=IF(AND(B3="dth", F3="dth"), E3+I3, "")

If b3 and/or F3 do not say "dth" I don't want anything to appear in the cell or it could say 0.

That is what the formula does, as I explained. If you want zero, change "" to 0.

When I try to enter the formula you suggested, I get an error message.

When I copy-and-paste the formula as posted, I do not get any error.

As I mentioned, perhaps you need to use semicolon (";") instead of comma (",") between parameters, to wit:

=IF(AND(B3="dth"; F3="dth"); E3+I3; "")

Alternatively, perhaps E3 and/or I3 contains text that Excel does not interpret as numeric. Be sure that ISNUMBER(E3) and ISNUMBER(I3) return TRUE.

If you want the flexibility of E3 and/or I3 containing non-numeric text, use N(E3)+N(I3) instead of E3+I3.

Do those suggestions resolve the problem?
 
Upvote 0
That is what the formula does, as I explained. If you want zero, change "" to 0.



When I copy-and-paste the formula as posted, I do not get any error.

As I mentioned, perhaps you need to use semicolon (";") instead of comma (",") between parameters, to wit:

=IF(AND(B3="dth"; F3="dth"); E3+I3; "")

Alternatively, perhaps E3 and/or I3 contains text that Excel does not interpret as numeric. Be sure that ISNUMBER(E3) and ISNUMBER(I3) return TRUE.

If you want the flexibility of E3 and/or I3 containing non-numeric text, use N(E3)+N(I3) instead of E3+I3.

Do those suggestions resolve the problem?

Thank you! Copying and pasting made it work. I must have been doing something wrong. I appreciate your assistance.
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,259
Members
449,075
Latest member
staticfluids

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