Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default how to do a nested if statement

I am looking at values in one column to see if they start with specific 2 or
3 char. then I want to have a result value of 1 of three words. I.E., if the
value contains ab at the beginning then the result in the next column will be
AB, if the value contains abc at the beginning then the result will be abc,
if the value contains def in the beginning then I want the result to be def.
I tried using 3 if statements. That did not work.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default how to do a nested if statement

It would seem you must look at the three characters first. Have you given us
all the things to look for? Are they just: abc, ab and def
=IF(LEFT(A1,3)="abc","ABC",IF(Left(A1,2)="AB","AB" ,IF(LEFT(A1,3)="DEF","DEF","Not
there")))
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"analyst" wrote in message
...
I am looking at values in one column to see if they start with specific 2
or
3 char. then I want to have a result value of 1 of three words. I.E., if
the
value contains ab at the beginning then the result in the next column will
be
AB, if the value contains abc at the beginning then the result will be
abc,
if the value contains def in the beginning then I want the result to be
def.
I tried using 3 if statements. That did not work.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 618
Default how to do a nested if statement

=IF(LEFT(A1,3)="abc","abc",IF(LEFT(A1,2)="ab","AB" ,IF(LEFT(A1,3)="def","def","none
of the above")))
--
David Biddulph

"analyst" wrote in message
...
I am looking at values in one column to see if they start with specific 2
or
3 char. then I want to have a result value of 1 of three words. I.E., if
the
value contains ab at the beginning then the result in the next column will
be
AB, if the value contains abc at the beginning then the result will be
abc,
if the value contains def in the beginning then I want the result to be
def.
I tried using 3 if statements. That did not work.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 740
Default how to do a nested if statement

i maybe confused..

<<then I want to have a result value of 1 of three words. I.E.,

"analyst" wrote:

I am looking at values in one column to see if they start with specific 2 or
3 char. then I want to have a result value of 1 of three words. I.E., if the
value contains ab at the beginning then the result in the next column will be
AB, if the value contains abc at the beginning then the result will be abc,
if the value contains def in the beginning then I want the result to be def.
I tried using 3 if statements. That did not work.

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
Nested "IF" Statement lajohn63 Excel Worksheet Functions 1 October 6th 06 10:56 AM
Nested IF statement with VLOOKUP James Hamilton Excel Discussion (Misc queries) 1 August 16th 06 07:46 AM
:confused: Nested if then else statement polk383 Excel Worksheet Functions 4 May 28th 06 06:02 PM
Problem with nested IF_OR statement DOOGIE Excel Worksheet Functions 7 June 24th 05 03:27 AM
7+ nested if statement? Turi Excel Worksheet Functions 3 December 20th 04 07:55 PM


All times are GMT +1. The time now is 06:00 AM.

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"