We help IT Professionals succeed at work.

How do I take a character off of a number - when the "clean" or "left/right" function doesn't work?

jag4
jag4 asked
on
I have a spreadsheet where the numbers for an ID were entered in with the ' in front of the IDs. I have tried the "clean" function and the "left/right" function but the number still stays the same.

Ex: '409
The cell shows up only as 409 but if I try to do a vlookup with that ID, it comes back N/A

Comment
Watch Question

Finance Analyst
Commented:
A couple of options:

1) in your lookup convert the lookup value to text, wher lookup value is in a1:

=vlookup(text(a1,"0"),lookuprange,offset,type)

2) use the value function to convert the input numbers to value, where a1 contains the erroneous input:

=VALUE(A1)

Thanks
Rob H
Rob HensonFinance Analyst

Commented:
Or, if you have error checking enabled the rroneous input cells are probably showing an error message. Use the dropdwon on the error message to convert text to number. You can highlight the whole block and use the error message on one cell to convert all highlighted.

RH
Select the column with the problem, and from the data ribbon, select text to column.
It will take you through a dialog - just take the default to everything and the column formats will be set back to general.

Author

Commented:
Thanks - not sure why my brain froze and why I couldn't think of this solution but it helped tremendously!