Return Everything in Cell Except First Character

Nanaia

Active Member
Joined
Jan 11, 2018
Messages
304
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I'm trying to modify an existing formula to return cell results but exclude the first character. The data entry person adds a # to the beginning of a part number and my formula brings back the results like it needs to however for coding I need to remove the # from the part number. It's one of those 'I know there's a way' but I can't think how to incorporate it. I'm thinking something with LEFT but I'm not fluent enough to figure out how or where.

This formula works, I just need to find a way to exclude the first character of the results. The part numbers (without the #) are no longer than three numbers and letters.

This is my formula: [ =IFERROR(VLOOKUP(D37,Table2[[#All],[LINE '#]:[QUANTITY]],2,FALSE),"") ]

Thank you for your help.
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Change D37 to MID(D37,2,999) - except I misread the question ... go with SUBSTITUTE as per Snakehips reply
 
Upvote 0
Maybe try...
=IFERROR(SUBSTITUTE(VLOOKUP(D37,Table2[[#All],[LINE '#]:[QUANTITY]],2,FALSE),"'#",""),"")

Hope that helps.
 
Upvote 0
[ =IFERROR(VLOOKUP(MID(D37,2,999),Table2[[#All],[LINE '#]:[QUANTITY]],2,FALSE),"") ] results in an empty cell.

[ =IFERROR(SUBSTITUTE(VLOOKUP(D37,Table2[[#All],[LINE '#]:[QUANTITY]],2,FALSE),"'#",""),"") ] provides the part number with the # at the beginning. So the same results as my original formula.
 
Upvote 0
Sorry, my keyboard doesn't produce the # character within Excel so I coppied from your formula and got a stray ' in there!
Try.... =IFERROR(SUBSTITUTE(VLOOKUP(D37,Table2[[#All],[LINE '#]:[QUANTITY]],2,FALSE),"#",""),"")
 
Upvote 0
Fabulous! The revised version worked! Thank you!
 
Upvote 0

Forum statistics

Threads
1,214,378
Messages
6,119,188
Members
448,873
Latest member
jacksonashleigh99

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