#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default text IF

I want to use text as a logical in an IF formula which I am sure you must be
ablr to do but I can't seem to figure it out. For example if D19 is sch, i
want E19 to = liz but if D19 is TCh i want E19 to = lex or if D19 is POS then
E19 = mav etc.
Please can someone help me?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default text IF

One way:

=IF(D19="sch","liz",IF(D19="TCh","lex",IF(D19="POS ","mav","other")))

However, you're limited to 7 levels of nesting pre-XL07.

You may do better with a lookup. For instance:

J K
1 sch liz
2 TCh lex
3 POS mav

Then use the formula

=VLOOKUP(D19,J:K,2,FALSE)

or, if it's possible that D19 has a value not in the table:

=IF(ISNA(VLOOKUP(D19,J:K,2,FALSE)),"other",VLOOKUP (D19,J:K,2,FALSE)




In article ,
Be18 wrote:

I want to use text as a logical in an IF formula which I am sure you must be
ablr to do but I can't seem to figure it out. For example if D19 is sch, i
want E19 to = liz but if D19 is TCh i want E19 to = lex or if D19 is POS then
E19 = mav etc.
Please can someone help me?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default text IF

Thanks for your reply. My formula looks like the first one, as i only have
five, however when i click out of the box it doesn't calculate and i can
still see the formula! Any extra help?
Thank u very much


"JE McGimpsey" wrote:

One way:

=IF(D19="sch","liz",IF(D19="TCh","lex",IF(D19="POS ","mav","other")))

However, you're limited to 7 levels of nesting pre-XL07.

You may do better with a lookup. For instance:

J K
1 sch liz
2 TCh lex
3 POS mav

Then use the formula

=VLOOKUP(D19,J:K,2,FALSE)

or, if it's possible that D19 has a value not in the table:

=IF(ISNA(VLOOKUP(D19,J:K,2,FALSE)),"other",VLOOKUP (D19,J:K,2,FALSE)




In article ,
Be18 wrote:

I want to use text as a logical in an IF formula which I am sure you must be
ablr to do but I can't seem to figure it out. For example if D19 is sch, i
want E19 to = liz but if D19 is TCh i want E19 to = lex or if D19 is POS then
E19 = mav etc.
Please can someone help me?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default text IF

Check your other thread.

Be18 wrote:

Thanks for your reply. My formula looks like the first one, as i only have
five, however when i click out of the box it doesn't calculate and i can
still see the formula! Any extra help?
Thank u very much

"JE McGimpsey" wrote:

One way:

=IF(D19="sch","liz",IF(D19="TCh","lex",IF(D19="POS ","mav","other")))

However, you're limited to 7 levels of nesting pre-XL07.

You may do better with a lookup. For instance:

J K
1 sch liz
2 TCh lex
3 POS mav

Then use the formula

=VLOOKUP(D19,J:K,2,FALSE)

or, if it's possible that D19 has a value not in the table:

=IF(ISNA(VLOOKUP(D19,J:K,2,FALSE)),"other",VLOOKUP (D19,J:K,2,FALSE)




In article ,
Be18 wrote:

I want to use text as a logical in an IF formula which I am sure you must be
ablr to do but I can't seem to figure it out. For example if D19 is sch, i
want E19 to = liz but if D19 is TCh i want E19 to = lex or if D19 is POS then
E19 = mav etc.
Please can someone help me?



--

Dave Peterson
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
Text not continuing to wrap for large block of text in Excel cell Mandra Charts and Charting in Excel 1 May 15th 06 07:13 PM
text (3750 char.)truncates with text wrap and row heigh adjusted? Boydster Excel Discussion (Misc queries) 1 May 19th 05 05:59 PM
want to remove all text characters equal to one character in length from text string [email protected] Excel Worksheet Functions 1 April 18th 05 09:56 PM
want to remove all text characters equal to one character in length from text string [email protected] Excel Worksheet Functions 1 April 18th 05 12:25 AM
Macro or Function to make text size to suite text Length? lbbss Excel Discussion (Misc queries) 4 December 14th 04 07:53 PM


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