Lookup to return first x characters of result

CookieMonster76

Board Regular
Joined
Apr 30, 2015
Messages
200
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

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
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,223,894
Messages
6,175,252
Members
452,623
Latest member
Techenthusiast

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