using <> and = in one formula

suiz919

New Member
Joined
Sep 16, 2011
Messages
23
here i want to take the sum of market values when multiple conditions are met.

here are the conditions:

CRS_4 <>"cash" or "cash fund"
and RATING_AVAIL = "AA+", "AA", or "AA-"

here is the formula i've come up with, but it's giving me a 0 which is not correct.
MVAI is an array i have for market value

=SUM(IF((CRS_4<>"CASH")*(CRS_4<>"CASH FUND"),IF(RATING_AVAIL="AA+",IF(RATING_AVAIL="AA",IF(RATING_AVAIL="AA-",MVAI,0),0))))

Thank you!
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Your formula will not work because all your conditions cannot be true at the same time.
 
Upvote 0
HotPepper, i don't think that's right.

I want to take the sum when the security is not equal to "1" or "2" and where the rating is either "a","b", or "c".


=SUM(IF((CRS_4<>"CASH")*(CRS_4<>"CASH FUND"),IF(RATING_AVAIL="AA+",IF(RATING_AVAIL="AA",IF(RATING_AVAIL="AA-",MVAI,0),0))))


Your formula will not work because all your conditions cannot be true at the same time.
 
Upvote 0
I think you messed up your logic in the rating part. If I understood you correctly, you are looking for this:

=SUM(IF((CRS_4<>"CASH")*(CRS_4<>"CASH FUND"), IF(RATING_AVAIL<>"AA+",IF(RATING_AVAIL<>"AA",IF(RATING_AVAIL<>"AA-",MVAI,0),0))))

as it would be impossible for the rating to be equal to "AA+", "AA" and "AA-" at the same time. You could also simplify this formula like this:

=SUM(IF((CRS_4<>"CASH")*(CRS_4<>"CASH FUND"), IF(left(RATING_AVAIL,2)<>"AA",MVAI,0),0))
 
Upvote 0

Forum statistics

Threads
1,224,517
Messages
6,179,239
Members
452,898
Latest member
Capolavoro009

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