#1   Report Post  
Posted to microsoft.public.excel.misc
KC KC is offline
external usenet poster
 
Posts: 107
Default IF OR Formula

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, "")
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default IF OR Formula

Hi,

=IF(AND(G5=H4,B5="Case Study"),7000,IF(AND(G5=H4,B5="Video"),24000,""))

Mike

"KC" wrote:

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, "")

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,276
Default IF OR Formula

Hi,

=IF(AND($G5=I$21,$B5="Case
Study"),7000,IF(AND($G5=I$21,$B5="Video"),24000,"" ))


"KC" wrote:

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, "")

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 118
Default IF OR Formula

Try this

=IF(AND(G5=H4,B5="Case Study"),7000,IF(AND(G5=H4,B5="Video"),24000,"")
--
If this helps, please click "Yes"
<<<<<<<<<<<


"KC" wrote:

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, "")

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default IF OR Formula

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,"")))
--
David Biddulph

"KC" wrote in message
...
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, "")



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"