Remove leading zeros from a function
I have a spreadsheet that prompts the user to enter an account number. The account number is in the format of C0001234. I am using a function to return the last 4 characters which are then passed to a query. I'm using the "right" function to get these last 4 characters. This works fine except when there are leading zeros in the result. For example the account number may be C0000C60. The function returns "0C60" and I need it to only return "C60". Is there any way to accomplish this? If the original account number was C0000020. I would want it to just return "20".
Originally Posted by elbmag
Hope this helps.
Couldn't get that to work
I tried that function but it didn't seem to work for me.
I did however get this one to accomplish what I needed. I took the last four characters from the original account number and then applied the following formula:
Thank you for your help.
Snasui's function did work
I'm sorry Snasui I tested your function using the wrong cell (not B6). Your function did work-the only reason it didn't the first time was my mistake.
I really appreciate your help.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Search Engine Friendly URLs by vBSEO 3.6.0 RC 1