excel 2010 sorting issue

Hi All


            After sorted by specific name, and in the index field when i try to press CTRL + left click the cross and drap down, suppose it will accumulate the number such as CE-CM1 , CE-CM2, any idea ?




sorting problem
piaakitAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rgonzo1971Commented:
Hi,

If you want an Index that goes from CE - CM1 to CE - CM100 for example not affected by the sorting use a formula (in M2) and fill down

="CE - CM"&ROW(B2)-1

or they can be resorted

Home / Editing / Fill / Series / Autofill OK

Regards
0
piaakitAuthor Commented:
any other way to fix, the one above dont work
0
piaakitAuthor Commented:
if i put 1 instead of CE-CM1, it can drag 1 - 10
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Rgonzo1971Commented:
Normally you can drag

CE-CM1 and the number will also add up

Regards
0
piaakitAuthor Commented:
but i have tried it can not add up after i created filter
0
Glenn RayExcel VBA DeveloperCommented:
The "drag and fill" or aufofill function will not work on filtered data.  Period.

If you want to create a sequence of new index numbers from the filtered data you'll have to use another method.  Here's one way you can achieve that:

1) Unfilter your data
2A)  If there are no values in the INDEX column (M) then enter this formula in cell M2 and copy down:
=IF(P2="COURIER (EXTERNAL)","CE - CM"&COUNTIF($P$2:P2,"COURIER (EXTERNAL)"),"")
You'll see the index show up for the COURIER (EXTERNAL) rows, incremented by one each time.
3A) Select all the cells in column M, copy, and paste the values in their place.

2B) If there are currently values in the INDEX column (M) then insert a temporary column in column N and add this formula in cell N2 and copy down:
=IF(Q2="COURIER (EXTERNAL)","CE - CM"&COUNTIF($Q$2:Q2,"COURIER (EXTERNAL)"),IF(M2="","",M2))
(Note that the formula is looking in column Q instead of P since this inserts a new column in N)
3B) Select all the cells in column N, copy, and paste the value in column M.
4B) Delete column N.

Note that you could replicate this process for the other three Delivery Arrangement categories if you wanted to increment them as well.  just replace the text strings being searched and the Index abbreviation in the formula.  Example file attached showing both formulas before copy and paste values.

Regards,
-Glenn
EE-AutoNumber.xlsx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.