Delete first two numbers...

m0atz

Board Regular
Joined
Jul 17, 2008
Messages
247
How do i loop through all the values in col D and remove the first two numbers? for example, a value in D1 is 447712444877 and i want it to read 7712444877. I have 200+ of these hence not wishing to change them manually..?

cheers

colin
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
in the next available column

=MID(D1,3,50)

If it's phone numbers, 50 should be plenty

If you didn't know the max length then

=MID(D1,3,LEN(D1)-2)
 
Upvote 0
If your wanting a formula solution you could try:

Change the last arguement to a higher number if some of your values are more digits than your example.

=MID(D1,3,10)
 
Upvote 0
thank you both - this works great.

there may be a requirement to add the "0" to the start of all these numbers as well, to make them into normal phone number type formats, is this easy to do as well?

Cheers
 
Upvote 0
Looks like it's solved but thought I'd throw in my alternative anyway.

=REPLACE(D1,1,2,0)

Or a failsafe that leaves the original number unchanged if it doesn't have the 44 prefix.

=IF(LEFT(D1,2)="44",REPLACE(D1,1,2,0),D1)

JB
 
Upvote 0
good options and i'll certainly note them as i'm sure the syntax will be useful for other requirements on my project.

thanks all for the responses.
 
Upvote 0

Forum statistics

Threads
1,222,383
Messages
6,165,653
Members
451,983
Latest member
Raph24

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