ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Lookup a name if cell value first letter is in a range (https://www.excelbanter.com/excel-worksheet-functions/217329-lookup-name-if-cell-value-first-letter-range.html)

FirstVette52

Lookup a name if cell value first letter is in a range
 
A B C D E F G H
1 Rep Student ID Last Name First Name Rep
2 L00012342 Acker John Danielle A-F
3 L00012343 Harrisuillos Mary William G-L
4 L00012344 Quhenrun Ed John M-R
5 L00012345 Voe Sue Katherine S-Z

This is what my data looks like (Student Table in Columns A,B,C,& D and a
Lookup Table in Columns F & G).

PROBLEM: If a 'Last Name' begins with a letter in a range (Column G), then
I want to assign the corresponding 'Rep' (Column F) to Column A. Is this a
possibility?

Thanks for any help you may be able to give
--
FirstVette52

Pete_UK

Lookup a name if cell value first letter is in a range
 
I would suggest that you use column H to store the first letter of the
range, i.e. A, G, M and S in your example, in H2:H5.

Then in A2 you can use this formula:

=INDEX(F$2:F$5,MATCH(LEFT(C2),H$2:H$5))

and copy it down as required.

Hope this helps.

Pete

On Jan 21, 3:20*pm, FirstVette52 <(My User name is Firstvette 52, too)
firstvet52@(my ISP E-mail provider is) netzero.com wrote:
* * * *A * * * * * * * *B * * * * * * *C * * * * * * * D * * * * * * * E * * * * * * F * *G * * H
1 * Rep Student ID * * * *Last Name *First Name Rep * *
2 * * * L00012342 * * * * *Acker * * * * * * *John * * * * * * *Danielle * * * *A-F
3 * * * L00012343 * * * * *Harrisuillos * Mary * * * * *William G-L
4 * * * L00012344 * * * * *Quhenrun * * Ed * * * * * * *John * *M-R
5 * * * L00012345 * * * * *Voe * * * * * * *Sue * * * * Katherine * * * S-Z

This is what my data looks like (Student Table in Columns A,B,C,& D and a
Lookup Table in Columns F & G).

PROBLEM: * If a 'Last Name' begins with a letter in a range (Column G), then
I want to assign the corresponding 'Rep' (Column F) to Column A. Is this a
possibility?

Thanks for any help you may be able to give
--
FirstVette52




All times are GMT +1. The time now is 08:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com