Перейти до основного матеріалу

Як сортувати буквено-цифрові дані в Excel?

Якщо у вас є список даних, які змішуються як із числами, так і з текстовими рядками, при нормальному сортуванні даних цих стовпців у Excel усі чисті числа сортуються зверху, а змішані текстові рядки знизу. Але, ваш потрібний результат, як останній показаний знімок екрана. У цій статті буде запропоновано корисний метод, який можна використовувати для сортування буквено-цифрових даних у програмі Excel, щоб досягти бажаних результатів.

Відсортуйте буквено-цифрові дані за допоміжним стовпцем формули

Вихідні дані   Зазвичай сортувати результат   ваш бажаний результат сортування
doc сортувати буквено-цифрові 1 2 doc сортувати буквено-цифрові 2 2 doc сортувати буквено-цифрові 3

стрілка синя права міхур Відсортуйте буквено-цифрові дані за допоміжним стовпцем формули

В Excel ви можете створити допоміжний стовпець формули, а потім відсортувати дані за цим новим стовпцем, виконайте такі дії:

1. Введіть цю формулу = ТЕКСТ (A2, "###") у порожню комірку, крім ваших даних, наприклад, B2, див. знімок екрана:

doc сортувати буквено-цифрові 4

2. Потім перетягніть маркер заповнення до клітинок, до яких потрібно застосувати цю формулу, див. Знімок екрана:

doc сортувати буквено-цифрові 5

3. А потім відсортуйте дані за цим новим стовпцем, виберіть допоміжний стовпець, який ви створили, і натисніть дані > сортувати, а у спливаючому вікні запиту виберіть Розгорніть вибір, див. скріншоти:

doc сортувати буквено-цифрові 6 2 doc сортувати буквено-цифрові 7

4, І натисніть сортувати кнопка, щоб відкрити сортувати діалогове вікно, під Колонка розділ, вибрати Допоміжна колонка ім'я, за яким потрібно сортувати, та використовувати Цінності при Сортувати за розділ, а потім виберіть порядок сортування, як хочете, див. знімок екрана:

doc сортувати буквено-цифрові 8

5. А потім клацніть OK, у спливаючому діалоговому вікні попередження про сортування виберіть Сортуйте номери та номери, що зберігаються як текст окремо, див. скріншот:

doc сортувати буквено-цифрові 9

6. Потім натисніть OK Ви можете бачити, що дані відсортовано відповідно до ваших потреб.

doc сортувати буквено-цифрові 10

7. Нарешті, ви можете видалити вміст допоміжного стовпця, як вам потрібно.

Найкращі інструменти продуктивності офісу

🤖 Kutools AI Aide: Революціонізуйте аналіз даних на основі: Інтелектуальне виконання   |  Згенерувати код  |  Створення спеціальних формул  |  Аналізуйте дані та створюйте діаграми  |  Викликати функції Kutools...
Популярні функції: Знайдіть, виділіть або визначте дублікати   |  Видалити порожні рядки   |  Об’єднайте стовпці або клітинки без втрати даних   |   Раунд без Формули ...
Супер пошук: VLookup за кількома критеріями    Багатозначний VLookup  |   VLookup на кількох аркушах   |   Нечіткий пошук ....
Розширений розкривний список: Швидке створення випадаючого списку   |  Залежний спадний список   |  Виберіть розкривний список, що вибирається ....
Менеджер колонок: Додайте конкретну кількість стовпців  |  Перемістити стовпці  |  Перемкнути статус видимості прихованих стовпців  |  Порівняйте діапазони та стовпці ...
Особливості: Фокус сітки   |  Перегляд дизайну   |   Велика панель формул    Диспетчер робочих книг і аркушів   |  Бібліотека ресурсів (автотекст)   |  Вибір дати   |  Об’єднайте робочі аркуші   |  Шифрування/розшифрування клітинок    Надсилайте листи за списком   |  Супер фільтр   |   Спеціальний фільтр (фільтр жирний/курсив/закреслений...) ...
Топ-15 наборів інструментів12 текст Tools (додати текст, Видалити символи, ...)   |   50 + Графік типи (діаграма Ганта, ...)   |   40+ Практичний Формули (Розрахуйте вік на основі дня народження, ...)   |   19 вставка Tools (Вставте QR-код, Вставити зображення зі шляху, ...)   |   12 Перетворення Tools (Числа до слів, Валютна конверсія, ...)   |   7 Злиття та розділення Tools (Розширені комбіновані ряди, Розділені клітини, ...)   |   ... і більше

Покращуйте свої навички Excel за допомогою Kutools для Excel і відчуйте ефективність, як ніколи раніше. Kutools для Excel пропонує понад 300 додаткових функцій для підвищення продуктивності та економії часу.  Натисніть тут, щоб отримати функцію, яка вам найбільше потрібна...

Опис


Вкладка Office Передає інтерфейс із вкладками в Office і значно полегшує вашу роботу

  • Увімкніть редагування та читання на вкладках у Word, Excel, PowerPoint, Publisher, Access, Visio та Project.
  • Відкривайте та створюйте кілька документів на нових вкладках того самого вікна, а не в нових вікнах.
  • Збільшує вашу продуктивність на 50% та зменшує сотні клацань миші для вас щодня!
Comments (10)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
The stock symbol for TrueCar Inc is "TRUE". When I sort the column containing the stock symbols, TRUE falls out of place at the end of the list. The cell is formatted as text. I am assuming that it is because "TRUE" has special meaning in Excel. Right now I am removing the "E", sorting the column so the row falls in the right place and then adding the E after the sort. Any ideas on a better approach?  
This comment was minimized by the moderator on the site
Hi, I have a similar sorting requirement, but with a unique problem ....
I have a range of Stock data which I need to sort in Category order.
The Range includes prices and one column has formulas.
The Category numbers range from 1 1a 1b etc to 32e.
I have continuously tried using a helper column with the formula =TEXT(K3,"###") - with K3 being the first Row in the Category column.
I select the helper column (N) and click Data - Sort - Expand the selection, but get no further as the "expansion" always selects from Row 40 - even if I select just a few rows in the helper column.
Why is this, and how can I sort my data correctly ?
Looking forward to a solution ....
Thanks.
Patrick.
This comment was minimized by the moderator on the site
Thanks for the tip on using a "helper column", but here's my question:

Is there a way to get the "related " columns to "tag along" with the sort precipitated by the helper column?

For example, column A contains a mixed-string product code that I can now sort into sequence using the "helper column" technique but, attached to that same product code are product descriptions, dimensions and other characteristics (some of which are also mixed-string in nature) in several other columns, and I need those to follow the "helper column" sort.

Any suggestions?

Much appreciated!

Lorne
This comment was minimized by the moderator on the site
I only see 1 method. Top of the article mentions that we will see 2 methods.
This comment was minimized by the moderator on the site
Hello, val,
Thank you for your comment, it is my mistake, I have deleted the second method from this article, and now, I have updated the article.

Thank you once more!
This comment was minimized by the moderator on the site
Trying to sort Alphanumeric with text. It is a fairly large list but below is an example. I can't strip the off the letter in a different column and sort by that because I have matching numbers that should come before them. I also can't really add a column to sort by and then hide that column - or delete it because I am constantly sorting the data. Any ideas? Will there be some formula? My current list: ---- What I want it to look like: 1 ---- 1 2 ---- 2 3 ---- 3 4 ---- 4 A1 ---- A1 A10 ---- A2 A100 ---- A3 A2 ---- A4 A20 ---- A5 A200 ---- A6 A3 ---- A7 A4 ---- A8 A5 ---- A9 A6 ---- A10 A60 ---- A20 A7 ---- A60 A8 ---- A100 A9 ---- A200
This comment was minimized by the moderator on the site
The easiest way I can think is to split the column into the Alpha part ("A") and the numeric part ("1") and then sort first by alpha then by numeric.
Your original 1,2,3,4 would need to stay in the alpha column to sort properly .

N.B. this might be a bit more difficult to achieve when the alpha part (the "A") is not a consistent length in your data. But definitely still possible.
This comment was minimized by the moderator on the site
I am running in the same problem. I have 1200 part numbers that I need to sort the way it's shown above but excel will put V15 after V1 if V14 is absent. I need V14 to appear after V9 or V8, where ever the part number ends.
This comment was minimized by the moderator on the site
Trying to sort Alphanumeric with text. It is a fairly large list but below is an example. I can't strip the off the letter in a different column and sort by that because I have matching numbers that should come before them. I also can't really add a column to sort by and then hide that column - or delete it because I am constantly sorting the data. Any ideas? My current list: ---- What I want it to look like: 1 ---- 1 2 ---- 2 3 ---- 3 4 ---- 4 A1 ---- A1 A10 ---- A2 A100 ---- A3 A2 ---- A4 A20 ---- A5 A200 ---- A6 A3 ---- A7 A4 ---- A8 A5 ---- A9 A6 ---- A10 A60 ---- A20 A7 ---- A60 A8 ---- A100 A9 ---- A200
This comment was minimized by the moderator on the site
When I do this, the column sorts by individual character and I don't get the right order. For instance, if I have the following data: A1: 1 A2: 2 A3: 1a1 A4: 12 A5: 1a2 I want them to be sorted like this: A1: 1 A2: 1a1 A3: 1a2 A4: 2 A5: 12 Just sorting the column normally I end up with this: A1: 1 A2: 2 A3: 12 A4: 1a1 A5: 1a2 Where the numbers are sorted correctly and then the alphanumeric values are sorted correctly, but the two are not sorted together. When I use the method in the article, I end up with this: A1: 1 A2: 12 A3: 1a1 A4: 1a2 A5: 2 Where the numeric and alphanumeric data are sorted together but incorrectly (12 should come after 2). Why is this happening?
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations