Is there Logic statement that quires number of digits

adoy73

New Member
Joined
Mar 14, 2006
Messages
46
I use Excel 2003.

Here is the sitatuion. I have a list of numbers in column A. They range from 10 digit to 12 digit numbers. I want to then create a list of numbers in column B.

In column B I want the last 10 digits of the numbers in column A. So if the number is 10 digits 1234567890 in column A then in column B it should also be 1234567890.

However if it is 11 or 12 digits, 12345678901 or 123456789012 then I want the number in column B to be 2345678901 or 3456789012.

I'm sure I can use the IF( ) statements to make this happen. But I'm not sure how, and I'm not sure what logic statement I would use to count digits.

Thank you. [/img]
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Forum statistics

Threads
1,214,583
Messages
6,120,377
Members
448,955
Latest member
BatCoder

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