Przejdź do głównej zawartości

Jak szybko sortować wiersze, aby pasowały do ​​innej kolumny w programie Excel?

dopasowanie sortowania dokumentów do innej kolumny 1
Jeśli masz dwie listy w arkuszu i obie mają te same wartości, ale w różnej kolejności, w jaki sposób możesz sortować jedną listę, aby pasowała do innej listy, jak pokazano na zrzucie ekranu? W tym artykule przedstawię formułę, która pomoże Ci szybko rozwiązać ten problem w programie Excel.
Sortuj wiersze, aby dopasować je do innej kolumny

strzałka niebieski prawy bąbelek Sortuj wiersze, aby dopasować je do innej kolumny

Poniższa formuła może pomóc w posortowaniu wierszy w celu dopasowania do innej kolumny.

1. Wybierz pustą komórkę obok kolumny, do której chcesz odwołać się, na przykład B1, a następnie wprowadź tę formułę = PODAJ.POZYCJĘ (A1; C: C; FAŁSZ)i przeciągnij uchwyt autouzupełniania w dół, aby zastosować tę formułę. Zobacz zrzut ekranu:
dopasowanie sortowania dokumentów do innej kolumny 2

Wskazówka: C: C to kolumna, na podstawie której chcesz skorzystać, a A1 to pierwsza komórka kolumny, którą chcesz posortować.

2. Następnie w komórkach formuły zostanie wyświetlona lista liczb. Wybierz listę, do której chcesz się odwołać, oraz listę numerów i kliknij Dane > Sortuj. Zobacz zrzut ekranu:
dopasowanie sortowania dokumentów do innej kolumny 3

3. A w Sortuj wybierz kolumnę zawierającą formuły z Kolumna rozwijaną listę i wybierz Wartości i Najmniejszy do największego z Sortuj według i Zamówienie listy rozwijane osobno. Zobacz zrzut ekranu:
dopasowanie sortowania dokumentów do innej kolumny 4

4. kliknij OK. Kolumna A jest sortowana tak, aby pasowała do kolumny C.
dopasowanie sortowania dokumentów do innej kolumny 5

Wskazówka: możesz usunąć kolumnę z formułą po sortowaniu, jeśli już jej nie potrzebujesz.


Szybko sortuj lub wybieraj komórki / wiersze / kolumny losowo z wyboru w programie Excel

Kutools dla programu Excel's Sort Range Losowo można szybko sortować lub wybierać dane losowo według komórek, kolumn lub wierszy. Kliknij, aby uzyskać pełny, 30-dniowy bezpłatny okres próbny!
doc sortuj losowo
doc wybierz losowo
 
 Kutools dla programu Excel: z ponad 300 poręcznymi dodatkami do Excela, możesz wypróbować bez ograniczeń w 30 dniach.

Najlepsze narzędzia biurowe

🤖 Pomocnik AI Kutools: Zrewolucjonizuj analizę danych w oparciu o: Inteligentne wykonanie   |  Wygeneruj kod  |  Twórz niestandardowe formuły  |  Analizuj dane i generuj wykresy  |  Wywołaj funkcje Kutools...
Popularne funkcje: Znajdź, wyróżnij lub zidentyfikuj duplikaty   |  Usuń puste wiersze   |  Łącz kolumny lub komórki bez utraty danych   |   Okrągły bez wzoru ...
Super wyszukiwanie: Wiele kryteriów VLookup    Wiele wartości VLookup  |   Przeglądanie pionowe na wielu arkuszach   |   Wyszukiwanie rozmyte ....
Zaawansowana lista rozwijana: Szybko twórz listę rozwijaną   |  Zależna lista rozwijana   |  Lista rozwijana wielokrotnego wyboru ....
Menedżer kolumn: Dodaj określoną liczbę kolumn  |  Przesuń kolumny  |  Przełącz stan widoczności ukrytych kolumn  |  Porównaj zakresy i kolumny ...
Polecane funkcje: Fokus siatki   |  Widok projektu   |   Duży pasek formuły    Menedżer skoroszytów i arkuszy   |  Biblioteka zasobów (Automatyczny tekst)   |  Selektor dat   |  Połącz arkusze   |  Szyfruj/odszyfruj komórki    Wysyłaj e-maile według listy   |  Super filtr   |   Specjalny filtr (filtruj pogrubienie/kursywa/przekreślenie...) ...
15 najlepszych zestawów narzędzi12 Tekst Tools (Dodaj tekst, Usuń znaki, ...)   |   50 + Wykres rodzaje (Wykres Gantta, ...)   |   40+ Praktyczne Wzory (Oblicz wiek na podstawie urodzin, ...)   |   19 Wprowadzenie Tools (Wstaw kod QR, Wstaw obraz ze ścieżki, ...)   |   12 Konwersja Tools (Liczby na słowa, Przeliczanie walut, ...)   |   7 Połącz i podziel Tools (Zaawansowane wiersze łączenia, Podział komórki, ...)   |   ... i więcej

Zwiększ swoje umiejętności Excela dzięki Kutools for Excel i doświadcz wydajności jak nigdy dotąd. Kutools dla programu Excel oferuje ponad 300 zaawansowanych funkcji zwiększających produktywność i oszczędzających czas.  Kliknij tutaj, aby uzyskać funkcję, której najbardziej potrzebujesz...

Opis


Karta Office wprowadza interfejs z zakładkami do pakietu Office i znacznie ułatwia pracę

  • Włącz edycję i czytanie na kartach w programach Word, Excel, PowerPoint, Publisher, Access, Visio i Project.
  • Otwieraj i twórz wiele dokumentów w nowych kartach tego samego okna, a nie w nowych oknach.
  • Zwiększa produktywność o 50% i redukuje setki kliknięć myszką każdego dnia!

Comments (25)
Rated 4.25 out of 5 · 2 ratings
This comment was minimized by the moderator on the site
Gracias, me ahorraste horas de trabajo y aprendí algo nuevo.
Rated 5 out of 5
This comment was minimized by the moderator on the site
Sorting data in rows to match respective column headers in excel.

A B C D E
---------
D
A C
C E
B D E
E
What I want it to look like:

A B C D E
---------
D
A C
C E
B D E
E
This comment was minimized by the moderator on the site
What it looks like:

A B C D E
---------
D
A C
C E
B D E
E
What I want it to look like:

A B C D E
---------
D
A C
C E
B D E
E

can we do this in Excel?
Rated 3.5 out of 5
This comment was minimized by the moderator on the site
Annn the formatting for that comment broke.

It would re-order it to:
0230
...........0231
...........0234
0236 0236
...........0240
0241
............0245
0250 0250
............0251

Is what I meant by insert empty cells as needed in each column
This comment was minimized by the moderator on the site
A lot of people are asking this question (on a 4 year old post) but I haven't found an answer.

I have 4 unique columns of time stamps from 4 sources. Not all the time stamps match up. I might have 0230, 0236, 0241, 0250 in one column and 0231, 0234, 0236, 0240, 0245, 0250, 0251 in another column. Is there away to have excel match the columns and insert empty cells as needed?
So instead of:
0230 0231
0236 0234
0241 0236 etc

It would re-order it to:
0230
0231
0234
0236 0236
0240
0241
0245
0250 0250
0251

I have about 13,000 rows I need to do this to across 4 columns so adding by hand or inserting rows is not feasible.
This comment was minimized by the moderator on the site
Hi, JOAT, you can use this formula:

=IFERROR(VLOOKUP(G1,$I$1:$I$8,1,FALSE)
See screenshot:
https://www.extendoffice.com/images/stories/comments/sun-comment/doc-lookup-formula-1.png
This comment was minimized by the moderator on the site
Hi, Great article!
I am wondering. If in the example above, column A does not have the value G2, this means that the sorting operation will be out of sync; 1,3,4,5,6,7,8. (missing a match for G2 on row index 2). Assuming that we want the rest of the data to line up, how can we resolve this without manually changing each line?
Is it possible to displace column A and use column B as a row index instead?
This comment was minimized by the moderator on the site
1 52 63 14 2 HOW CAN above two column data sort same data in one row
This comment was minimized by the moderator on the site
It doesn't help if the info is not exactly the same in both columns eg. column 1 has C,D,B, A and column 2 has B,D,C,A,G,R,T,H. When sorting column A to match column B, they won't match up. Any solution for this?
This comment was minimized by the moderator on the site
Sorry, the method only work while two columns have same numuber rows and same data but in different order.
This comment was minimized by the moderator on the site
Please share some way to sort if the info is not exactly the same in both columns eg. column 1 has C,D,B, A and column 2 has B,D,C,A,G,R,T,H.
This comment was minimized by the moderator on the site
Hey Sujith,

Did you find a solution because I have this exact problem. Please help
This comment was minimized by the moderator on the site
Daniella/Sujith,
How would the unique members of the resorted column be ordered? If they are numeric or alpha entries, then the ordering is simple; otherwise, it is less intuitive. May be easiest to isolate the 1-1 matching rows between the ref column and subject column, apply the ordering approach detailed above on that subset, then utilize a custom sort on the entire column as a final step. All of this is highly dependent on what type of data you have and ordering you expect to achieve.
-MH
This comment was minimized by the moderator on the site
Thanks a lot for this post.. made my work a lot easier :)
This comment was minimized by the moderator on the site
Anyone can help how to sort like below:

Column A is having and column B is having

1 1

1 2

2 1

2 2

But I need both column as


1

1

2

2
This comment was minimized by the moderator on the site
I do not understand your problem, can you give me more details?
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations