Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 53
Default tedious If & or statement

I have a tedious if statement to be made. What is an easier way of doing it.

If B2 is a or b or c or d or e or f, then a2 is XX
if B2 is g or h or i or j, then a2 is YY
if b2 is k or l or m or n or p, then a2 is ZZ
if b2 is q or r or s or t then a2 is ab
..
..
..
..
..
Is there a way or writing this in a if/or statement??

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default tedious If & or statement

I would make a table some place in the workbook with
a XX
b XX
.....
F XX
g YY
etc
Let's say this is in Y1:Z26
Then use =VLOOKUP(B2,Y1:Z26,2,FALSE)

best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Rajula" wrote in message
...
I have a tedious if statement to be made. What is an easier way of doing
it.

If B2 is a or b or c or d or e or f, then a2 is XX
if B2 is g or h or i or j, then a2 is YY
if b2 is k or l or m or n or p, then a2 is ZZ
if b2 is q or r or s or t then a2 is ab
.
.
.
.
.
Is there a way or writing this in a if/or statement??



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 53
Default tedious If & or statement

Hi All,

Thanks to all of you for your response.

I chose the Lookup option & i guess thats the best one. And more over my
list will keep growing, so its easier to update the tookup table.

Regards
Rajula

"Bernard Liengme" wrote:

I would make a table some place in the workbook with
a XX
b XX
.....
F XX
g YY
etc
Let's say this is in Y1:Z26
Then use =VLOOKUP(B2,Y1:Z26,2,FALSE)

best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Rajula" wrote in message
...
I have a tedious if statement to be made. What is an easier way of doing
it.

If B2 is a or b or c or d or e or f, then a2 is XX
if B2 is g or h or i or j, then a2 is YY
if b2 is k or l or m or n or p, then a2 is ZZ
if b2 is q or r or s or t then a2 is ab
.
.
.
.
.
Is there a way or writing this in a if/or statement??




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bj bj is offline
external usenet poster
 
Posts: 1,397
Default tedious If & or statement

try
=LOOKUP(A16,{"a","g","k","u"},{"XX","YY","ZZ","AB" ,""})

"Rajula" wrote:

I have a tedious if statement to be made. What is an easier way of doing it.

If B2 is a or b or c or d or e or f, then a2 is XX
if B2 is g or h or i or j, then a2 is YY
if b2 is k or l or m or n or p, then a2 is ZZ
if b2 is q or r or s or t then a2 is ab
.
.
.
.
.
Is there a way or writing this in a if/or statement??

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 96
Default tedious If & or statement

Put the below formula in cell A2...

=IF(OR(B2="a",B2="b",B2="c",B2="d",B2="e",B2="f"), "XX",IF(OR(B2="g",B2="h",B2="i",B2="j"),"YY",IF(OR (B2="k",B2="l",B2="m",B2="n",B2="p"),"ZZ",IF(OR(B2 ="q",B2="r",B2="s",B2="t"),"AB","Other"))))

Hope that helps.

"Rajula" wrote:

I have a tedious if statement to be made. What is an easier way of doing it.

If B2 is a or b or c or d or e or f, then a2 is XX
if B2 is g or h or i or j, then a2 is YY
if b2 is k or l or m or n or p, then a2 is ZZ
if b2 is q or r or s or t then a2 is ab
.
.
.
.
.
Is there a way or writing this in a if/or statement??



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
Renaming cells tedious and error prone LurfysMa New Users to Excel 2 December 24th 06 03:58 PM
appending and IF statement to an existing IF statement spence Excel Worksheet Functions 1 February 28th 06 11:00 PM
Expediting Tedious Work mikemillsjr Excel Discussion (Misc queries) 1 December 19th 05 07:09 PM
If statement and Isblank statement Rodney C. Excel Worksheet Functions 0 January 18th 05 08:39 PM
Help please, IF statement/SUMIF statement Brad_A Excel Worksheet Functions 23 January 11th 05 02:24 PM


All times are GMT +1. The time now is 06:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"