#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default 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




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default 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





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default 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





  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default 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



  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default 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





  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default 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




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


Similar Threads
Thread Thread Starter Forum Replies Last Post
SUMIF statement with AND statement Eric D Excel Discussion (Misc queries) 2 July 14th 08 07:24 PM
Can an If statement answer an If statement? M.A.Tyler Excel Discussion (Misc queries) 2 June 24th 07 04:14 AM
appending and IF statement to an existing IF statement spence Excel Worksheet Functions 1 February 28th 06 11:00 PM
If statement and Isblank statement Rodney C. Excel Worksheet Functions 0 January 18th 05 08:39 PM
Help please, IF statement/SUMIF statement Brad_A Excel Worksheet Functions 23 January 11th 05 02:24 PM


All times are GMT +1. The time now is 11:51 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"