Using a Left and Mid formula with a Vlookup

Hwatsonnn

Board Regular
Joined
Nov 14, 2018
Messages
58
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I have a Vlookup:

=IFNA(VLOOKUP($A4,'ON 2019'!$A:$H,COLUMN(),0),VLOOKUP($A4,'ON 2018'!$A:$H,COLUMN(),0))

Is it possible to then have this formula working after the Vlookup has worked out:

=LEFT(B4,8)&" "&MID(B4,9,6)

Thanks for any help
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Not exactly clear what you ask for. Do you mean you want the lookup value to be =LEFT(B4,8)&" "&MID(B4,9,6)? If so just replace both $A4 with LEFT(B4,8)&" "&MID(B4,9,6)
 
Upvote 0
If B4 in the formula represents the result of the VLOOKUP, you could use:

=REPLACE(LEFT(IFNA(VLOOKUP($A4,'ON 2019'!$A:$H,COLUMN(),0),VLOOKUP($A4,'ON 2018'!$A:$H,COLUMN(),0)),14),9,0," ")

If the VOOKUP result is only 14 characters, you don't need the LEFT function.
 
Upvote 0
I get a value returned that is 16 characters long, and I just wanted it to format nicely using that formula. I wasn't sure whether I could incorporate it into the the same cell.
Thanks
 
Upvote 0
If B4 in the formula represents the result of the VLOOKUP, you could use:

=REPLACE(LEFT(IFNA(VLOOKUP($A4,'ON 2019'!$A:$H,COLUMN(),0),VLOOKUP($A4,'ON 2018'!$A:$H,COLUMN(),0)),14),9,0," ")

If the VOOKUP result is only 14 characters, you don't need the LEFT function.

That worked perfectly, thanks a lot.
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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