Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
asf - ExcelForums.com
 
Posts: n/a
Default How to use "or" in an if function: If C1=C2 OR if

I am trying to make a spreadsheet with a cell that says if the value
in C1 = the value in c2 or the value in c3, then the cell returns a
"true"

So we start with:

=IF(c1=c2, "TRUE")

but I have no idea how to add "OR IF C1=C3" to the whole bit.

help! :D

  #2   Report Post  
N Harkawat
 
Posts: n/a
Default

=IF(OR(C2=C1,C1=C3),"true","")

"asf - ExcelForums.com" wrote in
message ...
I am trying to make a spreadsheet with a cell that says if the value
in C1 = the value in c2 or the value in c3, then the cell returns a
"true"

So we start with:

=IF(c1=c2, "TRUE")

but I have no idea how to add "OR IF C1=C3" to the whole bit.

help! :D



  #3   Report Post  
David McRitchie
 
Posts: n/a
Default

Use the OR Worksheet Function
=IF(OR(c1=c2,c1=C3) "TRUE", "False")
or since you would see number values as True or False anyway
=IF(OR(c1=c2,c1=C3))

You could do this as a Conditional Format, if you did not
want to use a column and wished to see color, but if you are
going to do more worksheet functions based on this result
then you would still want this in the worksheet or within subsequent
formulas.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"asf - ExcelForums.com" wrote in message ...
I am trying to make a spreadsheet with a cell that says if the value
in C1 = the value in c2 or the value in c3, then the cell returns a
"true"

So we start with:

=IF(c1=c2, "TRUE")

but I have no idea how to add "OR IF C1=C3" to the whole bit.

help! :D



  #4   Report Post  
Jimbola
 
Posts: n/a
Default

Hi

Use

=if(or(c1=c2,c1=c3),"TRUE")

HTH

J

"asf - ExcelForums.com" wrote:

I am trying to make a spreadsheet with a cell that says if the value
in C1 = the value in c2 or the value in c3, then the cell returns a
"true"

So we start with:

=IF(c1=c2, "TRUE")

but I have no idea how to add "OR IF C1=C3" to the whole bit.

help! :D


  #5   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

=OR(C1=C2,C1=C3)

or to exclude evaluation when C1 empty:

=IF(ISBLANK(C1),OR(C1=C2,C1=C3),"")

asf - ExcelForums.com wrote:
I am trying to make a spreadsheet with a cell that says if the value
in C1 = the value in c2 or the value in c3, then the cell returns a
"true"

So we start with:

=IF(c1=c2, "TRUE")

but I have no idea how to add "OR IF C1=C3" to the whole bit.

help! :D

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
clock Wildman Excel Worksheet Functions 2 April 26th 05 10:31 AM
Function Won't Calculate -- Sometimes Bill Martin -- (Remove NOSPAM from address) Excel Discussion (Misc queries) 4 April 13th 05 04:38 PM
Need a ISWorkday Function -- Any Ideas Mark Excel Worksheet Functions 5 March 29th 05 01:58 AM
Hyperlinks using R[1]C[1] and offset function in its cell referenc Elijah-Dadda Excel Worksheet Functions 0 March 5th 05 03:31 AM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM


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