vlookup and MID in a array

DonAndress

Active Member
Joined
Sep 25, 2011
Messages
362
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Hello.

Is it possible to create a formula that would use MID in an array of VLOOKUP?

Say, like below:
Code:
=VLOOKUP(N4,MID(RedbReds!J4:J30,33,11),1,FALSE)

When the array is like a normal range, vlookup returns what I wanted but when I add MID (and I know exactly starting point and no of characters) it returns #VALUE!.

Is it the only way to create MID function in a separate range and then define VLOOKUP to search in that new range?
 
Good point, didn't think of that. That solution is definitely less complicated and will often work.

However, it could (depending on the data) lead to different results:
Lookup: ABC
value 1: xxABCxxxxxxDEFxxx
value 2: xxABCxxxxxxABCxxx

The 'MID' formula (with start:12 and length:3) will select value 2
The "*" formula will select value 1.

VLOOKUP will pick out the first "ABC" match.

If the second or all matches of "ABC" are required, a different set up is required.
 
Upvote 0

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,214,653
Messages
6,120,752
Members
448,989
Latest member
mariah3

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