Copy cells based on number of number of digits in a code

curlisdave

New Member
Joined
Nov 15, 2018
Messages
4
Hi there,

I have a problem I cant quite figure out - I have two columns A & B running to 29,000 rows! In A I have codes ranging in length from 1 digit to to 7 digits. In column B are descriptors for each code.

i would like to extract to two new columns the 5-digit codes and their descriptors ONLY. Is there an easy way I can do this?

Many thanks in advance, if anyone can help.

David
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Welcome to the Board!

An easy way of doing it would be to do the following:
1. Add a formula in column C that returns the length of the codes in column A, i.e.
=LEN(A1)
2. Then either sort or use Filters on column C to segregate the 5 digit codes.
 
Last edited:
Upvote 0
You are welcome.
Glad I was able to help!:)
 
Upvote 0

Forum statistics

Threads
1,224,746
Messages
6,180,705
Members
452,994
Latest member
Janick

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