IF OR Formula

  • Thread starter Thread starter KC
  • Start date Start date
K

KC

I created the formula below, but its incorrect. If G5=H4 and B5="Case
Study", then the amount should be $7000, however, if G5=H4 and B5 = "Video"
then the amount should be $24000, and if G5 doesn't = H4, then leave cell
blank.

Can't figure out what I did wrong, but the formula below is adding $7000 &
$24000 together.

=IF(OR($G5=H$4,$B5="Case Study"),7000,"")+IF(OR($G5=H$4,$B5="Video"),24000,"")
 
Try this

=IF(AND(G5=H4,B5="Case Study"),7000,IF(AND(G5=H4,B5="Video"),24000,"")
 
Firstly you've got OR where you say you want AND.
Secondly you are then, in some situations, trying to add the text string ""
to a number, so you'll get a #VALUE! error.

=IF(OR($G5=H$4,$B5="Case
Study"),7000,"")+IF(OR($G5=H$4,$B5="Video"),24000,"")
could perhaps be changed to
=IF($G5<>H$4,"",IF($B5="Case Study",7000,IF($B5="Video",24000,"")))
 
Back
Top