Lookup to return first x characters of result

CookieMonster76

Board Regular
Joined
Apr 30, 2015
Messages
195
Hi

I have a simple lookup:

=IF(ISNA(VLOOKUP(B183,'Sheet2'!A:T,20,FALSE)),"",VLOOKUP(B183,'Sheet2'!A:T,20,FALSE))

However, the result (i.e. the data in Col T had 9 characters, but I need the lookup to only display the first 8 characters. Is there a way to do this?

Thanks

Paul
 

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
Hey,

try:
=LEFT(IF(ISNA(VLOOKUP(B183,'Sheet2'!A:T,20,FALSE)),"",VLOOKUP(B183,'Sheet2'!A:T,20,FALSE)),8)
 
Upvote 0
can't you use the =left(your formula here,8) to get the first 8?
 
Upvote 0
Hi

I have a simple lookup:

=IF(ISNA(VLOOKUP(B183,'Sheet2'!A:T,20,FALSE)),"",VLOOKUP(B183,'Sheet2'!A:T,20,FALSE))

However, the result (i.e. the data in Col T had 9 characters, but I need the lookup to only display the first 8 characters. Is there a way to do this?

Thanks

Paul

you might be able to simplify the formula to

=iferror(VLOOKUP(B183,'Sheet2'!A:T,20,FALSE),"")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,822
Messages
6,121,767
Members
449,049
Latest member
greyangel23

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