Special Vlookup

mbendit

New Member
Joined
Dec 14, 2020
Messages
15
Office Version
  1. 365
Platform
  1. Windows
The true/false aspect of the vlookup is giving me some problems. I'd like the lookup to return values based off the first 4 characters in the cell while still returning the entirety of the characters in the cell of the column that I'm referencing. So, in the example below, in my spreadsheet (an upload from a payroll provider) I only have 1295. I'd like the vlookup to return the entire account number 1295-UNBILLED RECEIVABLES.
EX:
1608045919279.png


any help would be appreciated.
 

Some videos you may like

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
53,149
Office Version
  1. 365
Platform
  1. Windows
You can use Vlookup with wild cards
Excel Formula:
=vlookup(C2&"*",A2:A1000,1,0)
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
53,149
Office Version
  1. 365
Platform
  1. Windows
With the example I used it will the 1st value in col A that starts with the contents of C2.
 

mbendit

New Member
Joined
Dec 14, 2020
Messages
15
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

With the example I used it will the 1st value in col A that starts with the contents of C2.
lol im just not getting it...
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
53,149
Office Version
  1. 365
Platform
  1. Windows
+Fluff v2.xlsm
ABCD
1
21295-abc12951295-abc
31296-abc12981298-abc
41297-abc
51298-abc
6
Main
Cell Formulas
RangeFormula
D2D2=VLOOKUP(C2&"*",A2:A1000,1,0)
D3D3=VLOOKUP(C3&"*",A2:A1000,1,0)
 

mbendit

New Member
Joined
Dec 14, 2020
Messages
15
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

+Fluff v2.xlsm
ABCD
1
21295-abc12951295-abc
31296-abc12981298-abc
41297-abc
51298-abc
6
Main
Cell Formulas
RangeFormula
D2D2=VLOOKUP(C2&"*",A2:A1000,1,0)
D3D3=VLOOKUP(C3&"*",A2:A1000,1,0)
here is the formula i used

=VLOOKUP(A:A&"*",'[DV COA 12.1.20.xlsx]Sheet1'!$C:$C,1)

Here are the values it returned, I'm off somehow:

1608049956314.png
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
53,149
Office Version
  1. 365
Platform
  1. Windows
You have missed the last argument, so it's doing an approximate match.
 

mbendit

New Member
Joined
Dec 14, 2020
Messages
15
Office Version
  1. 365
Platform
  1. Windows
You have missed the last argument, so it's doing an approximate match.
when i leave in the last argument it returns no values.
=VLOOKUP(A:A&"*",'[DV COA 12.1.20.xlsx]Sheet1'!$C:$C,1,0)

1608050575303.png
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
53,149
Office Version
  1. 365
Platform
  1. Windows
do you have any values that start with 3034-00?
 

Watch MrExcel Video

Forum statistics

Threads
1,123,014
Messages
5,599,345
Members
414,306
Latest member
Dennis_vdw

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
Top