ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   If statement (https://www.excelbanter.com/excel-discussion-misc-queries/212891-if-statement.html)

Cindi

If statement
 
Im trying to do an IF OR statement, but I have something wrong. I currently
have:

Columns P, U and AB are formatted as a custom date. Column AC (destination
column) is a whole number.

=IF(OR($P3480,+AB348-P348),"",IF($U3480,+P348-U348,""))

What Im trying to accomplish is, if column P is filled in then subtract AB
from P, but if U is filled, then subtract U from P, otherwise leave column AC
blank.

Can someone please help me?

--
JustLearning

Bernard Liengme

If statement
 
=IF($P3480, AB348-P348),IF($U3480,P348-U348,""))
This is read as: If P is greater than zero, return AB minus P
Else if U is great than 0, return P minus U
But is you want "to subtract AB from P" - to quote your message- then use

=IF($P3480, P348-AB348),IF($U3480,P348-U348,""))

You also use the phrase "if column P is filled ", so maybe P could have a
negative value or even a zero value and still be considered "filled", if so
=IF($P348< "", P348-AB348),IF($U348< "",P348-U348,""))
This reads: If P is not empty, then ,,,,, else if U is not empty

Please come back if clarifications are needed
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Cindi" wrote in message
...
I'm trying to do an IF OR statement, but I have something wrong. I
currently
have:

Columns P, U and AB are formatted as a custom date. Column AC
(destination
column) is a whole number.

=IF(OR($P3480,+AB348-P348),"",IF($U3480,+P348-U348,""))

What I'm trying to accomplish is, if column P is filled in then subtract
AB
from P, but if U is filled, then subtract U from P, otherwise leave column
AC
blank.

Can someone please help me?

--
JustLearning




Fred Smith[_4_]

If statement
 
Try it this way:
=IF($P3480,P348-AB348,IF($U3480,P348-U348,""))

This, as requested "subtracts AB from P". If this isn't really what you
want, then try:
=IF($P3480,AB348-P348,IF($U3480,P348-U348,""))

BTW, plus signs at the beginning of formulae are superfluous.

Regards,
Fred.




"Cindi" wrote in message
...
Im trying to do an IF OR statement, but I have something wrong. I
currently
have:

Columns P, U and AB are formatted as a custom date. Column AC
(destination
column) is a whole number.

=IF(OR($P3480,+AB348-P348),"",IF($U3480,+P348-U348,""))

What Im trying to accomplish is, if column P is filled in then subtract
AB
from P, but if U is filled, then subtract U from P, otherwise leave column
AC
blank.

Can someone please help me?

--
JustLearning



Cindi

If statement
 
Thanks.
--
JustLearning


"Bernard Liengme" wrote:

=IF($P3480, AB348-P348),IF($U3480,P348-U348,""))
This is read as: If P is greater than zero, return AB minus P
Else if U is great than 0, return P minus U
But is you want "to subtract AB from P" - to quote your message- then use

=IF($P3480, P348-AB348),IF($U3480,P348-U348,""))

You also use the phrase "if column P is filled ", so maybe P could have a
negative value or even a zero value and still be considered "filled", if so
=IF($P348< "", P348-AB348),IF($U348< "",P348-U348,""))
This reads: If P is not empty, then ,,,,, else if U is not empty

Please come back if clarifications are needed
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Cindi" wrote in message
...
I'm trying to do an IF OR statement, but I have something wrong. I
currently
have:

Columns P, U and AB are formatted as a custom date. Column AC
(destination
column) is a whole number.

=IF(OR($P3480,+AB348-P348),"",IF($U3480,+P348-U348,""))

What I'm trying to accomplish is, if column P is filled in then subtract
AB
from P, but if U is filled, then subtract U from P, otherwise leave column
AC
blank.

Can someone please help me?

--
JustLearning





Cindi

If statement
 
Thanks. I forgot something. Sometimes column P is N/A. How do I add this
to the formula to make column AC N/A if this is true for column P?
--
JustLearning


"Fred Smith" wrote:

Try it this way:
=IF($P3480,P348-AB348,IF($U3480,P348-U348,""))

This, as requested "subtracts AB from P". If this isn't really what you
want, then try:
=IF($P3480,AB348-P348,IF($U3480,P348-U348,""))

BTW, plus signs at the beginning of formulae are superfluous.

Regards,
Fred.




"Cindi" wrote in message
...
Im trying to do an IF OR statement, but I have something wrong. I
currently
have:

Columns P, U and AB are formatted as a custom date. Column AC
(destination
column) is a whole number.

=IF(OR($P3480,+AB348-P348),"",IF($U3480,+P348-U348,""))

What Im trying to accomplish is, if column P is filled in then subtract
AB
from P, but if U is filled, then subtract U from P, otherwise leave column
AC
blank.

Can someone please help me?

--
JustLearning




Bernard Liengme

If statement
 
=if(ISNA($P348), NA(), IF($P3480,P348-AB348,IF($U3480,P348-U348,"")))

Note three closing ) at end
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Cindi" wrote in message
...
Thanks. I forgot something. Sometimes column P is N/A. How do I add
this
to the formula to make column AC N/A if this is true for column P?
--
JustLearning


"Fred Smith" wrote:

Try it this way:
=IF($P3480,P348-AB348,IF($U3480,P348-U348,""))

This, as requested "subtracts AB from P". If this isn't really what you
want, then try:
=IF($P3480,AB348-P348,IF($U3480,P348-U348,""))

BTW, plus signs at the beginning of formulae are superfluous.

Regards,
Fred.




"Cindi" wrote in message
...
I'm trying to do an IF OR statement, but I have something wrong. I
currently
have:

Columns P, U and AB are formatted as a custom date. Column AC
(destination
column) is a whole number.

=IF(OR($P3480,+AB348-P348),"",IF($U3480,+P348-U348,""))

What I'm trying to accomplish is, if column P is filled in then
subtract
AB
from P, but if U is filled, then subtract U from P, otherwise leave
column
AC
blank.

Can someone please help me?

--
JustLearning






Fred Smith[_4_]

If statement
 
In my opinion, the best way to handle N/A's is not to have them in the first
place. I would fix the formula that currently generates the N/A.

Regards,
Fred.

"Fred Smith" wrote in message
...
Try it this way:
=IF($P3480,P348-AB348,IF($U3480,P348-U348,""))

This, as requested "subtracts AB from P". If this isn't really what you
want, then try:
=IF($P3480,AB348-P348,IF($U3480,P348-U348,""))

BTW, plus signs at the beginning of formulae are superfluous.

Regards,
Fred.




"Cindi" wrote in message
...
Im trying to do an IF OR statement, but I have something wrong. I
currently
have:

Columns P, U and AB are formatted as a custom date. Column AC
(destination
column) is a whole number.

=IF(OR($P3480,+AB348-P348),"",IF($U3480,+P348-U348,""))

What Im trying to accomplish is, if column P is filled in then subtract
AB
from P, but if U is filled, then subtract U from P, otherwise leave
column AC
blank.

Can someone please help me?

--
JustLearning




Cindi

If statement
 
Thank you. You've been very helpful.
--
JustLearning


"Bernard Liengme" wrote:

=if(ISNA($P348), NA(), IF($P3480,P348-AB348,IF($U3480,P348-U348,"")))

Note three closing ) at end
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Cindi" wrote in message
...
Thanks. I forgot something. Sometimes column P is N/A. How do I add
this
to the formula to make column AC N/A if this is true for column P?
--
JustLearning


"Fred Smith" wrote:

Try it this way:
=IF($P3480,P348-AB348,IF($U3480,P348-U348,""))

This, as requested "subtracts AB from P". If this isn't really what you
want, then try:
=IF($P3480,AB348-P348,IF($U3480,P348-U348,""))

BTW, plus signs at the beginning of formulae are superfluous.

Regards,
Fred.




"Cindi" wrote in message
...
I'm trying to do an IF OR statement, but I have something wrong. I
currently
have:

Columns P, U and AB are formatted as a custom date. Column AC
(destination
column) is a whole number.

=IF(OR($P3480,+AB348-P348),"",IF($U3480,+P348-U348,""))

What I'm trying to accomplish is, if column P is filled in then
subtract
AB
from P, but if U is filled, then subtract U from P, otherwise leave
column
AC
blank.

Can someone please help me?

--
JustLearning






Cindi

If statement
 
Thank you for the help. Sorry can't get rid of the N/A, it's required for a
blank field.
--
JustLearning


"Fred Smith" wrote:

In my opinion, the best way to handle N/A's is not to have them in the first
place. I would fix the formula that currently generates the N/A.

Regards,
Fred.

"Fred Smith" wrote in message
...
Try it this way:
=IF($P3480,P348-AB348,IF($U3480,P348-U348,""))

This, as requested "subtracts AB from P". If this isn't really what you
want, then try:
=IF($P3480,AB348-P348,IF($U3480,P348-U348,""))

BTW, plus signs at the beginning of formulae are superfluous.

Regards,
Fred.




"Cindi" wrote in message
...
Im trying to do an IF OR statement, but I have something wrong. I
currently
have:

Columns P, U and AB are formatted as a custom date. Column AC
(destination
column) is a whole number.

=IF(OR($P3480,+AB348-P348),"",IF($U3480,+P348-U348,""))

What Im trying to accomplish is, if column P is filled in then subtract
AB
from P, but if U is filled, then subtract U from P, otherwise leave
column AC
blank.

Can someone please help me?

--
JustLearning






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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com