HERE IS A ONE LINE CODE FOR DEVELOPER’S REFERENCE WHICH CAN BE USED TO SORT DATA
'Sort data in ascending order on Column F (Created At)
Sheet1.Range("A1:G" & Sheet1.Cells.SpecialCells(xlCellTypeLastCell).Row).Sort Key1:=Sheet1.Range("F1"), Order1:=xlAscending, Header:=xlYes, DataOption1:=xlSortNormal
After Sort:
IF YOU ARE LOOKING FOR A VBA CODE THAT CAN SORT THE DATA ON MULTIPLE COLUMNS AT THE SAME TIME THEN BELOW CODE MAY HELP YOU:
Public Sub SortByMultipleColumn()
'
'Clear old sort field
Sheet1.Sort.SortFields.Clear
'Add sort field on column D (Department ID)
Sheet1.Sort.SortFields.Add Key:=Sheet1.Range("D2:D20"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
'Add sort field on column F (Created At)
Sheet1.Sort.SortFields.Add Key:=Sheet1.Range("F2:F20"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With Sheet1.Sort
.SetRange Range("A1:G20")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
'
End Sub
Before Sort:
After Sort:
Duplicate Files Finder Tool is an MS Excel based tool to identify duplicate files exist in your system or shared folder. The tool takes a base folder path as input and list down all duplicate files in the folder and sub-folders. It has capability to find duplicate files by comparing the names and their size.
Table of Content VBA Code to Get User Domain Name VBA Code to Get User Domain Name – Method 1 VBA Code to Get User Domain Name – Method 2 Steps to use this VBA…
Time and Motion Tracker is an MS Excel based tool which helps you to track Start and End time of any type of transaction or activity. The tool is developed using VBA coding which helps you to protect manual manipulation in the data by the user. It is also easy to use, just click on Start (shortcut: Ctrl+W) or Stop (Ctrl+E) buttons to record the time stamp. This is professional version of our famous Time & Motion Tracker. This version includes features such as Hold Timer, Consolidation, Utilization Analysis, Dashboards etc.
Video: How to Hide Worksheet in Excel? Hide Sheet in Excel When I was creating an excel dashboard, there were multiple sheets which I used for calculation purpose and never wanted anybody to make any…
Did you come across any requirement where you want the user to interact with a sheet only through VBA Form? Here is a simple code which can help you.
Dummy Data Generator is an MS Excel based tool which has capability of generating 45 types of data which includes numbers, text, date, time, Memo (long text), Boolean etc.