Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 39
Default Use of Find with Left, Mid, Right functions in nested IF(and('s

I have a rather large (11k+ rows) sheet with, well, too many columns, to
which I've added an auxiliary column. One column describes the type of
service (support) the row is related to, and is unfortunately text and fairly
inconsistent in certain areas. While I have some experience using the left,
mid and right functions, as well as find, I'm having some difficulty coming
across the syntax required to locate the first " ", and gather the
alphanumeric character that proceeds it. For instance, if a field reads
"Premium 3yr" or "Premium 3 yr", what would be the most efficient formula to
extract only the "3"? Please keep in mind that I need to be able to use the
formula in an existing one with many existing nested IF(and( statements.
Appreciate any help as always.

MJW
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 180
Default Use of Find with Left, Mid, Right functions in nested IF(and('s

do you want to search for number 3 always or will ther be different numbers
to search?

--
Pranav Vaidya
VBA Developer
PN, MH-India
If you think my answer is useful, please rate this post as an ANSWER!!


"MJW" wrote:

I have a rather large (11k+ rows) sheet with, well, too many columns, to
which I've added an auxiliary column. One column describes the type of
service (support) the row is related to, and is unfortunately text and fairly
inconsistent in certain areas. While I have some experience using the left,
mid and right functions, as well as find, I'm having some difficulty coming
across the syntax required to locate the first " ", and gather the
alphanumeric character that proceeds it. For instance, if a field reads
"Premium 3yr" or "Premium 3 yr", what would be the most efficient formula to
extract only the "3"? Please keep in mind that I need to be able to use the
formula in an existing one with many existing nested IF(and( statements.
Appreciate any help as always.

MJW

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 39
Default Use of Find with Left, Mid, Right functions in nested IF(and('

Hi Pranav,

There will be different values there, depending on the length of service.
Appreciate the effort though. :)

Thanks,

Jamie

"Pranav Vaidya" wrote:

do you want to search for number 3 always or will ther be different numbers
to search?

--
Pranav Vaidya
VBA Developer
PN, MH-India
If you think my answer is useful, please rate this post as an ANSWER!!


"MJW" wrote:

I have a rather large (11k+ rows) sheet with, well, too many columns, to
which I've added an auxiliary column. One column describes the type of
service (support) the row is related to, and is unfortunately text and fairly
inconsistent in certain areas. While I have some experience using the left,
mid and right functions, as well as find, I'm having some difficulty coming
across the syntax required to locate the first " ", and gather the
alphanumeric character that proceeds it. For instance, if a field reads
"Premium 3yr" or "Premium 3 yr", what would be the most efficient formula to
extract only the "3"? Please keep in mind that I need to be able to use the
formula in an existing one with many existing nested IF(and( statements.
Appreciate any help as always.

MJW

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 964
Default Use of Find with Left, Mid, Right functions in nested IF(and('s

This simplest way would be:

=MID(A1,FIND(" ",A1)+1,1)

As long as your data remains consistent with the examples you provided, this
should be all you need. However, if you have data such as "Super Premium
3yr" or "Premium 10yr" then you'd need something a bit more complex.

HTH,
Elkar


"MJW" wrote:

I have a rather large (11k+ rows) sheet with, well, too many columns, to
which I've added an auxiliary column. One column describes the type of
service (support) the row is related to, and is unfortunately text and fairly
inconsistent in certain areas. While I have some experience using the left,
mid and right functions, as well as find, I'm having some difficulty coming
across the syntax required to locate the first " ", and gather the
alphanumeric character that proceeds it. For instance, if a field reads
"Premium 3yr" or "Premium 3 yr", what would be the most efficient formula to
extract only the "3"? Please keep in mind that I need to be able to use the
formula in an existing one with many existing nested IF(and( statements.
Appreciate any help as always.

MJW

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 39
Default Use of Find with Left, Mid, Right functions in nested IF(and('

Hi Elkar,

Thanks! This worked great... until I discovered yet another inconsistency.
Occasionally, it's reported as "Premium 1 yr", or "Premium1 yr", or "Premium
1yr"... so it seems I'll have to use the whole string in the data validation
and use nested or's within the and's in order to really determine a service
code.

Thanks

Jamie


"Elkar" wrote:

This simplest way would be:

=MID(A1,FIND(" ",A1)+1,1)

As long as your data remains consistent with the examples you provided, this
should be all you need. However, if you have data such as "Super Premium
3yr" or "Premium 10yr" then you'd need something a bit more complex.

HTH,
Elkar


"MJW" wrote:

I have a rather large (11k+ rows) sheet with, well, too many columns, to
which I've added an auxiliary column. One column describes the type of
service (support) the row is related to, and is unfortunately text and fairly
inconsistent in certain areas. While I have some experience using the left,
mid and right functions, as well as find, I'm having some difficulty coming
across the syntax required to locate the first " ", and gather the
alphanumeric character that proceeds it. For instance, if a field reads
"Premium 3yr" or "Premium 3 yr", what would be the most efficient formula to
extract only the "3"? Please keep in mind that I need to be able to use the
formula in an existing one with many existing nested IF(and( statements.
Appreciate any help as always.

MJW



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 964
Default Use of Find with Left, Mid, Right functions in nested IF(and('

Ok, let's see if this works any better.

=IF(RIGHT(A1,2)="yr",LOOKUP(9.99999999999999E+307,--MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"
0123456789")),ROW(INDIRECT("1:"&LEN(A1))))),"")

HTH,
Elkar


"MJW" wrote:

Hi Elkar,

Thanks! This worked great... until I discovered yet another inconsistency.
Occasionally, it's reported as "Premium 1 yr", or "Premium1 yr", or "Premium
1yr"... so it seems I'll have to use the whole string in the data validation
and use nested or's within the and's in order to really determine a service
code.

Thanks

Jamie


"Elkar" wrote:

This simplest way would be:

=MID(A1,FIND(" ",A1)+1,1)

As long as your data remains consistent with the examples you provided, this
should be all you need. However, if you have data such as "Super Premium
3yr" or "Premium 10yr" then you'd need something a bit more complex.

HTH,
Elkar


"MJW" wrote:

I have a rather large (11k+ rows) sheet with, well, too many columns, to
which I've added an auxiliary column. One column describes the type of
service (support) the row is related to, and is unfortunately text and fairly
inconsistent in certain areas. While I have some experience using the left,
mid and right functions, as well as find, I'm having some difficulty coming
across the syntax required to locate the first " ", and gather the
alphanumeric character that proceeds it. For instance, if a field reads
"Premium 3yr" or "Premium 3 yr", what would be the most efficient formula to
extract only the "3"? Please keep in mind that I need to be able to use the
formula in an existing one with many existing nested IF(and( statements.
Appreciate any help as always.

MJW

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 180
Default Use of Find with Left, Mid, Right functions in nested IF(and('s

This will return 3 opr blank space

=IF(NOT(ISERROR(FIND("3",A1))),MID(A1,FIND("3",A1) ,1),"")

--
Pranav Vaidya
VBA Developer
PN, MH-India
If you think my answer is useful, please rate this post as an ANSWER!!


"MJW" wrote:

I have a rather large (11k+ rows) sheet with, well, too many columns, to
which I've added an auxiliary column. One column describes the type of
service (support) the row is related to, and is unfortunately text and fairly
inconsistent in certain areas. While I have some experience using the left,
mid and right functions, as well as find, I'm having some difficulty coming
across the syntax required to locate the first " ", and gather the
alphanumeric character that proceeds it. For instance, if a field reads
"Premium 3yr" or "Premium 3 yr", what would be the most efficient formula to
extract only the "3"? Please keep in mind that I need to be able to use the
formula in an existing one with many existing nested IF(and( statements.
Appreciate any help as always.

MJW

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 281
Default Use of Find with Left, Mid, Right functions in nested IF(and('s

Hi,

Are you data elements started with "Premium" and ended with "yr"?

Thanks,
--
Farhad Hodjat


"MJW" wrote:

I have a rather large (11k+ rows) sheet with, well, too many columns, to
which I've added an auxiliary column. One column describes the type of
service (support) the row is related to, and is unfortunately text and fairly
inconsistent in certain areas. While I have some experience using the left,
mid and right functions, as well as find, I'm having some difficulty coming
across the syntax required to locate the first " ", and gather the
alphanumeric character that proceeds it. For instance, if a field reads
"Premium 3yr" or "Premium 3 yr", what would be the most efficient formula to
extract only the "3"? Please keep in mind that I need to be able to use the
formula in an existing one with many existing nested IF(and( statements.
Appreciate any help as always.

MJW

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 39
Default Use of Find with Left, Mid, Right functions in nested IF(and('

Hi Farhad,

The "yr" is the ending element, but the starting element could be several
different elements, and might include the year value as well due to the
validated column's source being a free-form text field entered manually. I
did create a solution using many nested if's and or's to account for the
correct format and two most-common incorrect formats to a value (IE:
"Premium 3 yr", "Premium3 yr", or "Premium 3yr"), but as noted in a question
I just posted (Subject: "Sometimes you get too close to the tree to see the
forest"), it isn't working... probably due to something incredibly obvious
which my tired eyes aren't seeing.

Thanks,

Jamie

"Farhad" wrote:

Hi,

Are you data elements started with "Premium" and ended with "yr"?

Thanks,
--
Farhad Hodjat


"MJW" wrote:

I have a rather large (11k+ rows) sheet with, well, too many columns, to
which I've added an auxiliary column. One column describes the type of
service (support) the row is related to, and is unfortunately text and fairly
inconsistent in certain areas. While I have some experience using the left,
mid and right functions, as well as find, I'm having some difficulty coming
across the syntax required to locate the first " ", and gather the
alphanumeric character that proceeds it. For instance, if a field reads
"Premium 3yr" or "Premium 3 yr", what would be the most efficient formula to
extract only the "3"? Please keep in mind that I need to be able to use the
formula in an existing one with many existing nested IF(and( statements.
Appreciate any help as always.

MJW

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
LEFT / RIGHT functions Kevin G Excel Worksheet Functions 3 April 6th 06 11:01 PM
Nested functions HELP! chiefnmd Excel Worksheet Functions 7 August 25th 05 05:20 AM
nested if(and) functions Rohan Excel Discussion (Misc queries) 3 August 12th 05 01:30 AM
LEFT, MID functions? Lindsey M Excel Worksheet Functions 6 March 16th 05 08:44 PM
Nested Functions Mindie Setting up and Configuration of Excel 1 February 16th 05 03:38 AM


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