Match lookup

texasalynn

Well-known Member
Joined
May 19, 2002
Messages
8,458
I need a way to lookup and return only part of a field. I have a table with account number and a field that I only want the first 2 digits and then in another field the mid(3,3). With the sample data I need from column D to get this from. I hope this makes sense.
Book1
ABCD
1Dist-AcctAcctSERVCLOC#SysCd
20240-123688412368840000112
30240-123688412368840000170
40260-002278300227830000110
50260-002278300227830000171
61625-015687701568771000100900
70326-048241404824141000100900
Sheet1


texasalynn
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
On a separate sheet I am looking up the dist-account number to get the two pieces of information from this sheet. My example is only a small portion of the workbook.

HTH
texasalynn
 
Upvote 0
On 2002-09-17 10:10, texasalynn wrote:
On a separate sheet I am looking up the dist-account number to get the two pieces of information from this sheet. My example is only a small portion of the workbook.

HTH
texasalynn

The example table has the following fields:

{"Dist-Acct";"Acct";"SERVC LOC";"#Sys Cd"}

Let 0240-1236884 be our lookup value.

What must be returned as results from which columns, given the foregoing lookup value?
 
Upvote 0
The example table has the following fields:

{"Dist-Acct";"Acct";"SERVC LOC";"#Sys Cd"}

Let 0240-1236884 be our lookup value.

What must be returned as results from which columns, given the foregoing lookup value?
Those are only going to have the two digits returned for this first selection.
My second table has
"Dist-Acct";"SERVC LOC";"BT";"SYS"}
So in the BT column I would have from the Sys CD the '12' and the SYS column would be blank.

Does that help?
texaslynn
 
Upvote 0
On 2002-09-17 10:44, texasalynn wrote:
The example table has the following fields:

{"Dist-Acct";"Acct";"SERVC LOC";"#Sys Cd"}

Let 0240-1236884 be our lookup value.

What must be returned as results from which columns, given the foregoing lookup value?
Those are only going to have the two digits returned for this first selection.
My second table has
"Dist-Acct";"SERVC LOC";"BT";"SYS"}
So in the BT column I would have from the Sys CD the '12' and the SYS column would be blank.

Does that help?
texaslynn

I'm unable to visualize what is required. Since I was also unable to get the answer I needed to the questions I posed, I can do two things: either give up or make a wild guess. Does what you're looking for looks like:

=LEFT(VLOOKUP(E1,$A$1:$B$4,2,0),2)

=MID(VLOOKUP(E1,$A$1:$B$4,2,0),3,3)

where E1 houses a lookup-value and $A$1:$B$4 a lookup table?

There is no control for errors in these formulas yet.
 
Upvote 0
Sorry to frustrate you Aladin! That is exactly what I needed. I didn't know you could do that with a formula. So I learned something new. So simple!!!!!

:smile:

Thank you so much
texasalynn
 
Upvote 0

Forum statistics

Threads
1,225,073
Messages
6,182,706
Members
453,132
Latest member
nsnodgrass73

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top