Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Manjit Gosal
 
Posts: n/a
Default IF STATEMENT PROBLEM

Hi Guys

I am quite new to IF Statements, but I have been thrown into a deep end. I
want three different values in cells in a column. My problem is that I can
get true or false values but I can't leave the cell blank if there is no
data in cells A1 and B1. The function that I want is that if cells A1 and B1
have values then D1=Sum(A1:B1) and Cell C1 then dispalys either Y, P or N,
which I want and got it right. If there are no values in Cells A1 and B1
then I am getting Y or False in Cell C1 but I want it to be left blank. The
statement looks something like this:

=IF(D1=(A1+B1),"Y",IF(D1<1,"N",IF(D1<(A1+B1),"P") ))


Please Help!!!!



  #2   Report Post  
Duke Carey
 
Posts: n/a
Default IF STATEMENT PROBLEM

Isn't it just:

=IF(D1=(A1+B1),"Y",IF(D1<1,"N","P"))

"Manjit Gosal" wrote:

Hi Guys

I am quite new to IF Statements, but I have been thrown into a deep end. I
want three different values in cells in a column. My problem is that I can
get true or false values but I can't leave the cell blank if there is no
data in cells A1 and B1. The function that I want is that if cells A1 and B1
have values then D1=Sum(A1:B1) and Cell C1 then dispalys either Y, P or N,
which I want and got it right. If there are no values in Cells A1 and B1
then I am getting Y or False in Cell C1 but I want it to be left blank. The
statement looks something like this:

=IF(D1=(A1+B1),"Y",IF(D1<1,"N",IF(D1<(A1+B1),"P") ))


Please Help!!!!




  #3   Report Post  
Sloth
 
Posts: n/a
Default IF STATEMENT PROBLEM

Your problem is that D1=(A1+B1) treats A1 and B1 as 0 if there is no value
in them. If A1 and B1 is blank, then you will get Y (or true) for any
postive value in D1. I think you need another if statement. like this.

=IF(A1+B1=0,"",IF(D1=(A1+B1),"Y",IF(D1<1,"N",IF(D 1<(A1+B1),"P")))

"Manjit Gosal" wrote:

Hi Guys

I am quite new to IF Statements, but I have been thrown into a deep end. I
want three different values in cells in a column. My problem is that I can
get true or false values but I can't leave the cell blank if there is no
data in cells A1 and B1. The function that I want is that if cells A1 and B1
have values then D1=Sum(A1:B1) and Cell C1 then dispalys either Y, P or N,
which I want and got it right. If there are no values in Cells A1 and B1
then I am getting Y or False in Cell C1 but I want it to be left blank. The
statement looks something like this:

=IF(D1=(A1+B1),"Y",IF(D1<1,"N",IF(D1<(A1+B1),"P") ))


Please Help!!!!




  #4   Report Post  
Manjit Gosal
 
Posts: n/a
Default IF STATEMENT PROBLEM

Yes! It is just that but still can't leave cell C1 Blank.
Thanks
"Duke Carey" wrote in message
...
Isn't it just:

=IF(D1=(A1+B1),"Y",IF(D1<1,"N","P"))

"Manjit Gosal" wrote:

Hi Guys

I am quite new to IF Statements, but I have been thrown into a deep end.
I
want three different values in cells in a column. My problem is that I
can
get true or false values but I can't leave the cell blank if there is no
data in cells A1 and B1. The function that I want is that if cells A1 and
B1
have values then D1=Sum(A1:B1) and Cell C1 then dispalys either Y, P or
N,
which I want and got it right. If there are no values in Cells A1 and B1
then I am getting Y or False in Cell C1 but I want it to be left blank.
The
statement looks something like this:

=IF(D1=(A1+B1),"Y",IF(D1<1,"N",IF(D1<(A1+B1),"P") ))


Please Help!!!!








  #5   Report Post  
Manjit Gosal
 
Posts: n/a
Default IF STATEMENT PROBLEM

Thanks a lot to both of you. You both were right but didn't get blank cell
still, but by mixing the two statements i.e. putting bits from both your
statements I eventually got it right. This is how it looks now:

=IF(A1+B1=0,"",IF(D1=(A1+B1),"Y",IF(D1<1,"N","P") ))

Thanks again

"Manjit Gosal" wrote in message
...
Hi Guys

I am quite new to IF Statements, but I have been thrown into a deep end. I
want three different values in cells in a column. My problem is that I can
get true or false values but I can't leave the cell blank if there is no
data in cells A1 and B1. The function that I want is that if cells A1 and
B1 have values then D1=Sum(A1:B1) and Cell C1 then dispalys either Y, P or
N, which I want and got it right. If there are no values in Cells A1 and
B1 then I am getting Y or False in Cell C1 but I want it to be left blank.
The statement looks something like this:

=IF(D1=(A1+B1),"Y",IF(D1<1,"N",IF(D1<(A1+B1),"P") ))


Please Help!!!!






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
If statement Matt Montagliano Excel Discussion (Misc queries) 1 September 8th 05 08:47 PM
Slight problem automating Excel in a service someone Setting up and Configuration of Excel 2 May 13th 05 10:04 PM
Fundamental problem with IF statement David F Excel Worksheet Functions 4 May 12th 05 09:34 PM
Formula Problem - If Statement Margie Excel Worksheet Functions 4 April 29th 05 10:07 PM
Excel Display Problem Bill Martin -- (Remove NOSPAM from address) Excel Discussion (Misc queries) 0 April 19th 05 05:25 PM


All times are GMT +1. The time now is 01:46 PM.

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

About Us

"It's about Microsoft Excel"