Загрузка страницы

Excel Automatically Sort When Data Changes or Added | Auto Sort Excel Formula | Auto Sort Macro

Download the featured file here https://www.bluepecantraining.com/wp-content/uploads/2021/04/Auto-Sort.xlsx

Please note this file does not have the VBA code included as I am unable to upload macro-enabled files to WordPress. Please find the code you need below.

Need pre-built Excel spreadsheet solutions?  Try Simple Sheets - over 100 templates covering your personal and work-based needs including Gantt charts, personal budgets, employee scheduling, timesheets and more… https://www.simplesheets.co/a/45451/v7Aj9zMx

By clicking on this link you are helping to support this blog – thanks!

In this video I demonstrate how to automatically sort data when it is changed or when new data is added. The video covers the following methods:

1) Automatically sort numeric data using the RANK, INDEX and MATCH. Deal with ties using IF and COUNTIF.

2) Automatically sort text data using COUNTIF, INDEX and MATCH. Deal with ties using IF and COUNTIF.

3) Automatically sort any data in Excel 365 using the SORT function.

4) Automatically sort any data in situ using a VBA macro. Here's the code featured in the video:

Private Sub Worksheet_Change(ByVal Target As Range)

Dim SalesTable As ListObject
Dim SortCol As Range

Set SalesTable = ActiveSheet.ListObjects("Sales2022")
Set SortCol = Range("Sales2022[Sales 2022]")

If Not Intersect(Target, SortCol) Is Nothing Then
With SalesTable.Sort
.SortFields.Clear
.SortFields.Add Key:=SortCol, Order:=xlDescending
.Header = xlYes
.Apply
End With
End If

End Sub

Видео Excel Automatically Sort When Data Changes or Added | Auto Sort Excel Formula | Auto Sort Macro канала Chester Tugwell
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
28 апреля 2021 г. 18:00:14
00:14:57
Яндекс.Метрика