Djblois
12-19-2008, 08:34 AM
I am writing a formula but I am missing one part, I need to convert text into a number. Is there a function that will do this?
Here is what I have:
=IF(LEN(A7678)=5,VLOOKUP(LEFT(A7678,1),Country!A:B,2,FALSE),VLOOKUP(LEFT(A7 678,2),Country!A:B,2,FALSE))
What I want it to do is if the code is 5 digits then do a vlookup off the first digit, otherwise do it off the first two digits. However, whenever you do left on a number, it pulls it out as text - not a number. So I need a function that will convert it into a number. Thank you for help.
Here is what I have:
=IF(LEN(A7678)=5,VLOOKUP(LEFT(A7678,1),Country!A:B,2,FALSE),VLOOKUP(LEFT(A7 678,2),Country!A:B,2,FALSE))
What I want it to do is if the code is 5 digits then do a vlookup off the first digit, otherwise do it off the first two digits. However, whenever you do left on a number, it pulls it out as text - not a number. So I need a function that will convert it into a number. Thank you for help.