Having trouble with vlookup and mid function

titoexcel

Board Regular
Joined
Mar 26, 2013
Messages
55
I have the following list in

column A:
CO-006-8602790
CO-006-8613249
CO-006-8613781
CO-009-0023846
CO-009-0024750
CO-009-0025424
CO-497-0461171
I am trying to use it in the following format : =vlookup(mid(A2,4,11)+0,range,column,match type)

I have my corresponding columns in a different worksheet and need to bring value back, What am I doing wrong?

Thank you

<tbody>
</tbody><colgroup><col></colgroup>
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Sixthsense

Active Member
Joined
Nov 19, 2012
Messages
385
Replace mid(A2,4,11)+0

with

Code:
=SUBSTITUTE(MID(A2,4,11),"-","")+0

<colgroup> </colgroup><tbody> </tbody>
 
Upvote 0

Teeroy

Well-known Member
Joined
Nov 9, 2012
Messages
2,244
Office Version
  1. 365
Platform
  1. Windows
With [mid(A2,4,11)+0] you are trying to add a number to a string. If you are trying to append a trailing zero onto the string (after dropping the "CO-") then use "&" instead of "+".
 
Upvote 0

Forum statistics

Threads
1,195,590
Messages
6,010,612
Members
441,558
Latest member
lambierules

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