Excel - Add Sequence Numbers Before Sorting Or Filtering In Excel - Episode 1908

1,890 views · Published 13 August 2014 · 6:08 · Indexed 25 October 2026

Channel: MrExcel.com · 2014 · Education

Watch on YouTube

Microsoft Excel Tutorial: Add Sequence Numbers to Original Rows Before Sorting.

Welcome to the MrExcel podcast. In this episode, we will be discussing data cleansing with the Sequencer. After receiving some great suggestions from our viewers, we will be exploring a macro created by Jim Simons to help with data cleansing. This macro is especially useful for dealing with data from PDF files, which can often be messy and require a lot of manual cleaning. With the Sequencer, we can easily get rid of repeated report titles and sort the data back into its original sequence.

To use the Sequencer, simply add a sequence column to your data and then run the macro, which can be assigned to a keyboard shortcut for convenience. The macro will insert a new column and add sequence numbers from 1 to the last row of data, even if there are gaps in the data. This simplifies the process of sorting and cleaning the data, making it much more efficient and less tedious.

But that's not all! In this episode, we also address a question from a previous episode about filling cells with numbers. Excel MVP Bob Umlas shared a one-line macro that simplifies the process, and fellow MVP Brian Crosby suggested using an event handler macro to automatically clear cells when a smaller number is entered. These tips and tricks from our viewers are a great example of the collaborative and helpful community here at MrExcel.

We hope you find these tips useful and add them to your Excel repertoire. Thank you to Jim Simons, Bob Umlas, and Brian Crosby for their contributions, and thank you for tuning in to the MrExcel podcast. Don't forget to check out our LiveLessons VBA Excel course from Que for even more Excel knowledge and skills. See you next time for another informative netcast from MrExcel.

Buy Bill Jelen's latest Excel book: https://www.mrexcel.com/products/latest/

You can help my channel by clicking Like or commenting below: https://www.mrexcel.com/like-mrexcel-on-youtube/


Table of Contents:
(00:00) Data Cleansing with The Sequencer
(00:12) Jim Simons Sequencer tool
(00:28) Introduction of the Sequencer macro
(00:38) Demonstration of the Sequencer tool
(01:31) Explanation of the code for the Sequencer macro
(02:08) Demonstration of how the Sequencer simplifies data cleansing
(02:59) Additional notes and suggestions from viewers
(03:23) Explanation of Bob Umlas' suggestion for a more efficient macro
(03:58) Explanation of Brian Crosby's suggestion for an event handler macro
(05:25) Demonstration of the event handler macro in action
(05:35) Clicking Like really helps the algorithm

#excel #microsoft #microsoftexcel #exceltutorial #exceltips #exceltricks #excelmvp #freeclass #freecourse #freeclasses #excelclasses #microsoftmvp #walkthrough #evergreen #spreadsheetskills #analytics #analysis #dataanalysis #dataanalytics #mrexcel #spreadsheets #spreadsheet #excelhelp #accounting #tutorial #excelvba #excelsequence

This video answers these common search terms:
how to add sequence of numbers in excel
add sequence numbers before sorting or filtering in excel
how to populate numbers in sequence in excel
how to add number sequence in excel
how to fill a sequence in excell
how to generate sequence numbers in excel

Ugh - you import data that has Row 1 headings and title repeated every 40 rows throughout the data. We've all been there. Today, a cool macro from Jim Simons called The Sequencer to quickly add the "original sequence" numbers so you can sort, and then sort back.
Also in today's episode: An ad for LiveLessons Excel VBA & Macros at http://tinyurl.com/l9z2yp4  Plus, a tip from Bob Umlas on using EVALUATE to shorten the macro from Episode 1907, and an event handler from Brian Crosby to improve episode 1907.

Join the MrExcel Message Board discussion about this video at  https://www.mrexcel.com/board/threads/1153735/

More from this channel