#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Left Function

I am trying to pull certain characters based on a criteria for the third
position character.

In Column A, I could have a code such as BB11 or a Code such as BMR2. If
the third position character is a number then I only want to pull the first 2
digits BB but if the third position character is a letter, then I would like
to pull the first 3 characters BMR.

Can anyone help?


--
AJ
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Left Function

Try this

=LEFT(A1,3-(ISNUMBER(MID(A1,3,1)+0)))

--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"AJ" wrote:

I am trying to pull certain characters based on a criteria for the third
position character.

In Column A, I could have a code such as BB11 or a Code such as BMR2. If
the third position character is a number then I only want to pull the first 2
digits BB but if the third position character is a letter, then I would like
to pull the first 3 characters BMR.

Can anyone help?


--
AJ

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
How to nest a left function within a sumif function? LisaK Excel Worksheet Functions 2 April 23rd 23 11:46 AM
LEFT function-all to left of a comma? Jennifer F Excel Worksheet Functions 1 January 21st 09 11:19 PM
Help with LEFT function Cam Excel Discussion (Misc queries) 5 October 15th 07 07:32 PM
Left vs Left$ function Andy Excel Discussion (Misc queries) 5 May 6th 07 04:06 AM
HOW DO I NEST THE VLOOKUP FUNCTION WITH THE LEFT FUNCTION CHAIM Excel Worksheet Functions 1 July 27th 05 09:10 PM


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