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 statement



 
 
Thread Tools Display Modes
  #1  
Old February 9th, 2010, 02:56 PM posted to microsoft.public.excel.worksheet.functions
Debra Reid
external usenet poster
 
Posts: 1
Default if statement

In using the "if" statement I would like the logic portion to state that if
cell# = v or m or d or a but the if statement seems to only work if the logic
is = to a number. Should I be using another formula?
  #2  
Old February 9th, 2010, 03:03 PM posted to microsoft.public.excel.worksheet.functions
Mike H
external usenet poster
 
Posts: 8,419
Default if statement

Hi,

try this

=IF(OR(A1="v",A1="m",A1="d",A1="a"),"Found one","Nope not there")
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Debra Reid" wrote:

In using the "if" statement I would like the logic portion to state that if
cell# = v or m or d or a but the if statement seems to only work if the logic
is = to a number. Should I be using another formula?

  #3  
Old February 9th, 2010, 03:07 PM posted to microsoft.public.excel.worksheet.functions
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default if statement

Text strings should be within quotes...

=IF(OR(A1="v",A1="m"),"Yes","No")

--
Jacob


"Debra Reid" wrote:

In using the "if" statement I would like the logic portion to state that if
cell# = v or m or d or a but the if statement seems to only work if the logic
is = to a number. Should I be using another formula?

  #4  
Old February 9th, 2010, 04:14 PM posted to microsoft.public.excel.worksheet.functions
Debra Reid[_2_]
external usenet poster
 
Posts: 3
Default if statement

Sorry about the double posting. I have never used this before and when I
posted it gave me an error so I did not think it would post.

thank-you greatly. Both suggestions worked.

Debra

"Mike H" wrote:

Hi,

try this

=IF(OR(A1="v",A1="m",A1="d",A1="a"),"Found one","Nope not there")
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Debra Reid" wrote:

In using the "if" statement I would like the logic portion to state that if
cell# = v or m or d or a but the if statement seems to only work if the logic
is = to a number. Should I be using another formula?

  #5  
Old February 9th, 2010, 04:16 PM posted to microsoft.public.excel.worksheet.functions
Debra Reid[_2_]
external usenet poster
 
Posts: 3
Default if statement

Thanks this helps.

"Jacob Skaria" wrote:

Text strings should be within quotes...

=IF(OR(A1="v",A1="m"),"Yes","No")

--
Jacob


"Debra Reid" wrote:

In using the "if" statement I would like the logic portion to state that if
cell# = v or m or d or a but the if statement seems to only work if the logic
is = to a number. Should I be using another formula?

  #6  
Old February 9th, 2010, 04:52 PM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default if statement

Here's another way...

=IF(OR(A1={"V","M","D","A"}),"Yes","No")

--
Biff
Microsoft Excel MVP


"Debra Reid" Debra wrote in message
...
In using the "if" statement I would like the logic portion to state that
if
cell# = v or m or d or a but the if statement seems to only work if the
logic
is = to a number. Should I be using another formula?



 




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 01:25 PM.


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