Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default lookup or find matching number in text string

I need help with a lookup function. I have an excel spreedsheet with 5
columns. , Clerk1, Clerk2....clerk5
The clerk fields contain text & numeric values (assignment codes). This is
a general field where any text can be inputted with the numeric value. I
need a formula to search all the columns, find a particular value (ie
"15.06") and identify which clerk is working on that assignment. In this
case, I would need the formula's value to equal "Clerk2" if I was looking up
"15.06". The columns are not sorted & contain a variety/combination of text
and numbers in each cell. All the numbers will have the decimal followed by
two digits.

Col A Col B

Row1 Clerk1 Clerk2
Row2 12.07 for JS 63.07, 15.06 due TR
Row3 899.07 & 701.07 for RO 229.07-231.07

row50 23.07 TR for RO 19.07 & 11.07
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default lookup or find matching number in text string

Try this array formula** :

Row 1 A1:E1 = Clerk headers

Data in the range A2:E10

B12 = lookup value

=INDEX(A1:E1,MAX((ISNUMBER(SEARCH(B12,A2:E10)))*CO LUMN(A2:E10)-MIN(COLUMN(A2:E10))+1))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"mmanis" wrote in message
...
I need help with a lookup function. I have an excel spreedsheet with 5
columns. , Clerk1, Clerk2....clerk5
The clerk fields contain text & numeric values (assignment codes). This
is
a general field where any text can be inputted with the numeric value. I
need a formula to search all the columns, find a particular value (ie
"15.06") and identify which clerk is working on that assignment. In this
case, I would need the formula's value to equal "Clerk2" if I was looking
up
"15.06". The columns are not sorted & contain a variety/combination of
text
and numbers in each cell. All the numbers will have the decimal followed
by
two digits.

Col A Col B

Row1 Clerk1 Clerk2
Row2 12.07 for JS 63.07, 15.06 due TR
Row3 899.07 & 701.07 for RO 229.07-231.07

row50 23.07 TR for RO 19.07 & 11.07



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default lookup or find matching number in text string

It'd probably be a good idea to include a test to make sure the lookup value
is actually present otherwise you'll get a "false positive" (read: incorrect
result).

Array entered:

=IF(SUMPRODUCT(--(ISNUMBER(SEARCH(B12,A2:E10))))*(B12<""),INDEX(A1 :E1,MAX((ISNUMBER(SEARCH(B12,A2:E10)))*COLUMN(A2:E 10)-MIN(COLUMN(A2:E10))+1)),"not
found")

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Try this array formula** :

Row 1 A1:E1 = Clerk headers

Data in the range A2:E10

B12 = lookup value

=INDEX(A1:E1,MAX((ISNUMBER(SEARCH(B12,A2:E10)))*CO LUMN(A2:E10)-MIN(COLUMN(A2:E10))+1))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"mmanis" wrote in message
...
I need help with a lookup function. I have an excel spreedsheet with 5
columns. , Clerk1, Clerk2....clerk5
The clerk fields contain text & numeric values (assignment codes). This
is
a general field where any text can be inputted with the numeric value. I
need a formula to search all the columns, find a particular value (ie
"15.06") and identify which clerk is working on that assignment. In this
case, I would need the formula's value to equal "Clerk2" if I was looking
up
"15.06". The columns are not sorted & contain a variety/combination of
text
and numbers in each cell. All the numbers will have the decimal followed
by
two digits.

Col A Col B

Row1 Clerk1 Clerk2
Row2 12.07 for JS 63.07, 15.06 due TR
Row3 899.07 & 701.07 for RO 229.07-231.07

row50 23.07 TR for RO 19.07 & 11.07





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default lookup or find matching number in text string

I was finally able to get back to the project at hand. Thank you for your
response. I set up the array formula, but seem to have one problem. If the
lookup value is 1.07, the formula is picking up other instances where that
value may fall. For example, Column B had the value 1.07, column D had the
value of 101.07. Column D became the the value of the array formula. I am
not sure how to have the exact value found when the lookup value maybe a
smaller part of an larger number and may appear in the column after the
larger number (24.07 not 427.07)

"T. Valko" wrote:

It'd probably be a good idea to include a test to make sure the lookup value
is actually present otherwise you'll get a "false positive" (read: incorrect
result).

Array entered:

=IF(SUMPRODUCT(--(ISNUMBER(SEARCH(B12,A2:E10))))*(B12<""),INDEX(A1 :E1,MAX((ISNUMBER(SEARCH(B12,A2:E10)))*COLUMN(A2:E 10)-MIN(COLUMN(A2:E10))+1)),"not
found")

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Try this array formula** :

Row 1 A1:E1 = Clerk headers

Data in the range A2:E10

B12 = lookup value

=INDEX(A1:E1,MAX((ISNUMBER(SEARCH(B12,A2:E10)))*CO LUMN(A2:E10)-MIN(COLUMN(A2:E10))+1))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"mmanis" wrote in message
...
I need help with a lookup function. I have an excel spreedsheet with 5
columns. , Clerk1, Clerk2....clerk5
The clerk fields contain text & numeric values (assignment codes). This
is
a general field where any text can be inputted with the numeric value. I
need a formula to search all the columns, find a particular value (ie
"15.06") and identify which clerk is working on that assignment. In this
case, I would need the formula's value to equal "Clerk2" if I was looking
up
"15.06". The columns are not sorted & contain a variety/combination of
text
and numbers in each cell. All the numbers will have the decimal followed
by
two digits.

Col A Col B

Row1 Clerk1 Clerk2
Row2 12.07 for JS 63.07, 15.06 due TR
Row3 899.07 & 701.07 for RO 229.07-231.07

row50 23.07 TR for RO 19.07 & 11.07






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
find matching text mnorton822 Excel Worksheet Functions 1 July 6th 07 04:32 AM
find last number in a string? Steve Excel Discussion (Misc queries) 3 June 12th 07 03:56 PM
Find Matching Text In Col A move to Col B J.J. Excel Worksheet Functions 3 February 26th 06 04:53 AM
Splitting a text string into string and number mcambrose Excel Discussion (Misc queries) 4 February 21st 06 03:47 PM
find position of a number in a string fullers80 Excel Worksheet Functions 1 September 6th 05 03:47 PM


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