Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Need to use multiple values in the If function in Excel

I Am using if C1 = 3
4 = Value if True
7 = Value if False

What i wanted to do is
if C1 is 3 or 4 or 5
4 = Value if True
7 = Value if False

What is the syntax I would use if i wnat to check for multiple values i.e 3
or 4 or 5 as against just 3

Thank you very much for your assistnacce

Sam Commar


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 698
Default Need to use multiple values in the If function in Excel

Try this:

=IF(OR(C1={3,4,5}),4,7)

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Sam Commar" wrote:

I Am using if C1 = 3
4 = Value if True
7 = Value if False

What i wanted to do is
if C1 is 3 or 4 or 5
4 = Value if True
7 = Value if False

What is the syntax I would use if i wnat to check for multiple values i.e 3
or 4 or 5 as against just 3

Thank you very much for your assistnacce

Sam Commar



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Need to use multiple values in the If function in Excel

Ron
Thanks a ton. Do you know how i can incorpate a leter in there eg
=IF(OR(C1={3H,4,5W}),4,7)
"Ron Coderre" wrote in message
...
Try this:

=IF(OR(C1={3,4,5}),4,7)

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Sam Commar" wrote:

I Am using if C1 = 3
4 = Value if True
7 = Value if False

What i wanted to do is
if C1 is 3 or 4 or 5
4 = Value if True
7 = Value if False

What is the syntax I would use if i wnat to check for multiple values i.e
3
or 4 or 5 as against just 3

Thank you very much for your assistnacce

Sam Commar





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 698
Default Need to use multiple values in the If function in Excel

Sure....you need to tell Excel when you're using text strings by enclosing
them in quotes....otherwise, it thinks the text is a reference.

Try this:
=IF(OR(C1={"3H",4,"5W"}),4,7)

Note: if the 4 will be text....then use this:
=IF(OR(C1={"3H","4","5W"}),4,7)

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Sam Commar" wrote:

Ron
Thanks a ton. Do you know how i can incorpate a leter in there eg
=IF(OR(C1={3H,4,5W}),4,7)
"Ron Coderre" wrote in message
...
Try this:

=IF(OR(C1={3,4,5}),4,7)

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Sam Commar" wrote:

I Am using if C1 = 3
4 = Value if True
7 = Value if False

What i wanted to do is
if C1 is 3 or 4 or 5
4 = Value if True
7 = Value if False

What is the syntax I would use if i wnat to check for multiple values i.e
3
or 4 or 5 as against just 3

Thank you very much for your assistnacce

Sam Commar






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 Function with multiple return values jerminski73 Excel Worksheet Functions 6 April 28th 07 12:16 AM
HELP ON THE VLOOK UP FUNCTION FOR MULTIPLE VALUES. John Excel Discussion (Misc queries) 4 February 10th 07 09:34 PM
Finding multiple values of a function trainerbro Excel Worksheet Functions 3 November 6th 06 08:09 PM
Multiple If function for more than 7 values echo_park Excel Worksheet Functions 6 August 7th 06 03:41 PM
VBA function returning multiple values? DM Excel Programming 9 January 15th 04 05:02 PM


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