A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

IF - And - Then Statement question



 
 
Thread Tools Display Modes
  #1  
Old September 19th, 2008, 03:03 PM posted to microsoft.public.excel.worksheet.functions
MayJuneJuly
external usenet poster
 
Posts: 16
Default IF - And - Then Statement question

Could you help me to write and if-and-then statement?

example:
Col A Col B

C BSY

I am trying to have the statement read: IF Column A = C AND Column B = BSY,
THAN Column A = W




  #2  
Old September 19th, 2008, 03:24 PM posted to microsoft.public.excel.worksheet.functions
Pete_UK
external usenet poster
 
Posts: 8,780
Default IF - And - Then Statement question

You won't be able to do that. A formula returns a result to the cell
that it sits in, so it would have to be in column A in order to return
a value there. Consequently, it cannot refer to itself (circular
reference).

However, if you put the formula in C2, then you could have this:

=IF(AND(A2="C",B2="BSY"),"W","")

This will return a "W" in C2 if the two conditions are met, otherwise
C2 will appear blank.

Hope this helps.

Pete

On Sep 19, 3:03*pm, MayJuneJuly
wrote:
Could you help me to write and if-and-then statement?

example:
Col A * *Col B

* C * * * BSY

I am trying to have the statement read: IF Column A = C AND Column B = BSY,
THAN Column A = W


  #3  
Old September 19th, 2008, 03:41 PM posted to microsoft.public.excel.worksheet.functions
MayJuneJuly
external usenet poster
 
Posts: 16
Default IF - And - Then Statement question

What about VBA?

"Pete_UK" wrote:

You won't be able to do that. A formula returns a result to the cell
that it sits in, so it would have to be in column A in order to return
a value there. Consequently, it cannot refer to itself (circular
reference).

However, if you put the formula in C2, then you could have this:

=IF(AND(A2="C",B2="BSY"),"W","")

This will return a "W" in C2 if the two conditions are met, otherwise
C2 will appear blank.

Hope this helps.

Pete

On Sep 19, 3:03 pm, MayJuneJuly
wrote:
Could you help me to write and if-and-then statement?

example:
Col A Col B

C BSY

I am trying to have the statement read: IF Column A = C AND Column B = BSY,
THAN Column A = W



  #4  
Old September 19th, 2008, 03:50 PM posted to microsoft.public.excel.worksheet.functions
Pete_UK
external usenet poster
 
Posts: 8,780
Default IF - And - Then Statement question

Yes, it could be done with a macro, but as you posted in the Functions
group I though you were looking for a formulaic solution.

Pete

On Sep 19, 3:41*pm, MayJuneJuly
wrote:
What about VBA?



"Pete_UK" wrote:
You won't be able to do that. A formula returns a result to the cell
that it sits in, so it would have to be in column A in order to return
a value there. Consequently, it cannot refer to itself (circular
reference).


However, if you put the formula in C2, then you could have this:


=IF(AND(A2="C",B2="BSY"),"W","")


This will return a "W" in C2 if the two conditions are met, otherwise
C2 will appear blank.


Hope this helps.


Pete


On Sep 19, 3:03 pm, MayJuneJuly
wrote:
Could you help me to write and if-and-then statement?


example:
Col A * *Col B


* C * * * BSY


I am trying to have the statement read: IF Column A = C AND Column B = BSY,
THAN Column A = W- Hide quoted text -


- Show quoted text -


  #5  
Old September 19th, 2008, 04:00 PM posted to microsoft.public.excel.worksheet.functions
MayJuneJuly
external usenet poster
 
Posts: 16
Default IF - And - Then Statement question

Thank you...VBA came to mind after I read your answer. You have been very
helpful. I will post my question to the correct group.

"Pete_UK" wrote:

Yes, it could be done with a macro, but as you posted in the Functions
group I though you were looking for a formulaic solution.

Pete

On Sep 19, 3:41 pm, MayJuneJuly
wrote:
What about VBA?



"Pete_UK" wrote:
You won't be able to do that. A formula returns a result to the cell
that it sits in, so it would have to be in column A in order to return
a value there. Consequently, it cannot refer to itself (circular
reference).


However, if you put the formula in C2, then you could have this:


=IF(AND(A2="C",B2="BSY"),"W","")


This will return a "W" in C2 if the two conditions are met, otherwise
C2 will appear blank.


Hope this helps.


Pete


On Sep 19, 3:03 pm, MayJuneJuly
wrote:
Could you help me to write and if-and-then statement?


example:
Col A Col B


C BSY


I am trying to have the statement read: IF Column A = C AND Column B = BSY,
THAN Column A = W- Hide quoted text -


- Show quoted text -



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:53 AM.


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