Help on IF(OR) Function

M

Mukesh

I need return value in cell (D4) ....IF(OR) one
or both cells have the numbers, for example.

I am trying to do in cell D4 is.....
=IF(OR(D21,I21), D21*1000/L3, I21*1000/L3)

it returns correct value from cell D21, but from cell I21..
won't show up! and when both cells (D21 & I21) are
empty, the result cell (D4) shows " #VALUE! "

Please help, how do I solve this?

Thanks.
Mukesh
 
M

Mark

I need return value in cell (D4) ....IF(OR) one
or both cells have the numbers, for example.

I am trying to do in cell D4 is.....
=IF(OR(D21,I21), D21*1000/L3, I21*1000/L3)

I am not sure what you want the formula to return...
If both D21 and I21 have values, which do you want to display
I think you are using the wrong functions, but not sure as I dont
understand the application you are trying to acieve...
please elaborate...

As for the #Value thing, I can fix that but not sure what you need
first
 
F

FloMM2

Mukesh,
If I understand your problem....
If there is a value in D21, multiply it by 1000 and divide that by the value
in L3.
If there is not a value in D21 and there is in I21, then multiply I21 by
1000 and divide it by the value in L3.
To accomplish the above:
"=IF(D21>0,D21*1000/L3,I21*1000/L3)"

The issue with "#VLAUE" is excel does not like to divide by zero.

HTH
:)
 
M

Mukesh

Thanks....this worked!


FloMM2 said:
Mukesh,
If I understand your problem....
If there is a value in D21, multiply it by 1000 and divide that by the value
in L3.
If there is not a value in D21 and there is in I21, then multiply I21 by
1000 and divide it by the value in L3.
To accomplish the above:
"=IF(D21>0,D21*1000/L3,I21*1000/L3)"

The issue with "#VLAUE" is excel does not like to divide by zero.

HTH
:)
 
S

Sandy Mann

The issue with "#VLAUE" is excel does not like to divide by zero.

Actually it is the OR(D21,I21) that is returning the #VALUE! error. If you
change that to OR(D21<>"",I21<>"") then the divisions return #DIV/0! errors
as you would expect.

--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
M

Mukesh

Can someone please help me with this now....

I am trying to get result in cell L21
=IF(E21="abc",D21*D4/100," "), IF(J21="abc",I21*D4/100," ")
I am getting " #VALUE" error.

I even tried...
=IF(OR(E21,J21="abc"), D4*D21, D4*I21)
but doesn't work !.....what wrong am I doing.

Thanks in advance.

Mukesh
 
S

Sandy Mann

=IF(E21="abc",D21*D4/100, IF(J21="abc",I21*D4/100,""))

Make the FALSE part of =IF(E21="abc", the second IF

Note that I used an empty string , ("") for the second FALSE not a space ("
")

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
S

Sandy Mann

I should have checked where the split would be:
Note that I used an empty string , ("") for the second FALSE not a space ("
")


--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
M

Mukesh

Thank you sooooo much, it worked.
I tried putting a space (" ") instead of empty string ("") and that worked too
and when I remove both (the empty space & string, I get an output FALSE,
which ofcourse I don't want, was just testing to see what result I get.

Thank you.......you guys rock.

Mukesh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top