Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Darren
 
Posts: n/a
Default If Function with OR

I am trying to use an IF function to asign a code per region. I have two
codes one code for two countries and an other code for all others. In my if
statement how will i get it to look for the two, i need something that works
like an OR. So IF the cell has Place1 or Place2 give it a specific code ELSE
give it another code.

Please Help
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default If Function with OR

Try something like this:

For
A1: (a country)

This formula assigns Place2 and Place3 to Region_1, all others are
Other_Region
B1: =IF(SUM(COUNTIF(A1,{"Place2","Place3"})),"Region_1 ","Other_Region")

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"Darren" wrote:

I am trying to use an IF function to asign a code per region. I have two
codes one code for two countries and an other code for all others. In my if
statement how will i get it to look for the two, i need something that works
like an OR. So IF the cell has Place1 or Place2 give it a specific code ELSE
give it another code.

Please Help

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Paul Mathews
 
Posts: n/a
Default If Function with OR

Hi Darren, what you want is something like this:

=IF(OR(A1,A2),first thing,secondthing)

"Darren" wrote:

I am trying to use an IF function to asign a code per region. I have two
codes one code for two countries and an other code for all others. In my if
statement how will i get it to look for the two, i need something that works
like an OR. So IF the cell has Place1 or Place2 give it a specific code ELSE
give it another code.

Please Help

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default If Function with OR

syntax you need is

=if(or(condition1,condition2),DoTrue,DoFalse)

hope this helps

Darren wrote:
I am trying to use an IF function to asign a code per region. I have two
codes one code for two countries and an other code for all others. In my if
statement how will i get it to look for the two, i need something that works
like an OR. So IF the cell has Place1 or Place2 give it a specific code ELSE
give it another code.

Please Help


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default If Function with OR

A bit shorter (and easier to follow)

A1: (a country)

B1: =IF(OR(A1="Place2",A1="Place3"),"Region_1","Other_ Region")

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

XL2002, WinXP


"Ron Coderre" wrote:

Try something like this:

For
A1: (a country)

This formula assigns Place2 and Place3 to Region_1, all others are
Other_Region
B1: =IF(SUM(COUNTIF(A1,{"Place2","Place3"})),"Region_1 ","Other_Region")

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"Darren" wrote:

I am trying to use an IF function to asign a code per region. I have two
codes one code for two countries and an other code for all others. In my if
statement how will i get it to look for the two, i need something that works
like an OR. So IF the cell has Place1 or Place2 give it a specific code ELSE
give it another code.

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
Creating a Custom Excel Function to Calculate Gini Coefficients [email protected] Excel Worksheet Functions 3 February 21st 06 10:15 PM
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 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
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. Robert AS Excel Worksheet Functions 4 December 2nd 04 10:49 AM


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

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"