macro to edit cell contents

imported_unknown

Active Member
Joined
Jan 13, 2002
Messages
424
I'm working with a large spreadsheet that has a column of cell entries that are each 14 digits long. I need to edit each cell entry in the column to eliminate the first 3 digits and last 6 digits. For example cell A2 = 00012345000R01, A3 = 00012345000R02. I need to edit the cell to return the five digits 12345. Any ideas on a macro I can write to do this for 50,000 lines of data?
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Use Data | Text To Columns, with "Fixed With". You can make the 3 groups (1-3, 4-8,9-14), and "skip" the first and third columns.

You could also use a formula in an adjacent column, and then copy and paste as values.
 
Upvote 0
Thank you very much. That was too easy! I was making it much harder than it needed to be. Excel has so many tools, and I'm only scratching the surface. Thanks again.
 
Upvote 0

Forum statistics

Threads
1,214,619
Messages
6,120,550
Members
448,970
Latest member
kennimack

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