How can I sort the names column in all sheets

Googles

New Member
Joined
Dec 15, 2017
Messages
32
Hey Mr EXCEL users,
I need some help about this please:

How can I sort the names column in each sheet.
For example: we have some names like this:

Sheet 1 (Main)

[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Birthday[/TD]
[TD]Class[/TD]
[/TR]
[TR]
[TD]Kofi[/TD]
[TD]02.09.2011[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]Matt[/TD]
[TD]18.10.2011[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]Kathrine[/TD]
[TD]15.07.2011[/TD]
[TD]C[/TD]
[/TR]
</tbody>[/TABLE]

Sheet 2, 3 and 4 (October), (November) and (December)
[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Subject[/TD]
[TD]Degree[/TD]
[/TR]
[TR]
[TD]Kofi[/TD]
[TD]Physics [/TD]
[TD]81%[/TD]
[/TR]
[TR]
[TD]Matt[/TD]
[TD]Mathematics [/TD]
[TD]79%[/TD]
[/TR]
[TR]
[TD]Kathrine[/TD]
[TD]Physics [/TD]
[TD]90%[/TD]
[/TR]
</tbody>[/TABLE]



Note: that we have more than x Sheets for Ex. 2 Sheets with other Information but with same Names, how can I
adding a new Name to the list in the (main sheet) we arranged the names sheet.
I want to arrange it in all Sheets without losing the data that is already stored.
Like this (1st only in the main sheet):


Sheet 1 (Main)
[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Birthday[/TD]
[TD]Class[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]02.09.2011[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]Kathrine[/TD]
[TD]18.10.2011[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]Matt[/TD]
[TD]15.07.2011[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]Sara[/TD]
[TD]11.12.2011[/TD]
[TD]B[/TD]
[/TR]
</tbody>[/TABLE]


and then automatically like this:

Sheet 2, 3 and 4 (October), (November) and (December)
[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Subject[/TD]
[TD]Degree[/TD]
[/TR]
[TR]
[TD]Kathrine[/TD]
[TD]Physics [/TD]
[TD]90%[/TD]
[/TR]
[TR]
[TD]Kofi[/TD]
[TD]Physics [/TD]
[TD]81%[/TD]
[/TR]
[TR]
[TD]Matt[/TD]
[TD]Mathematics [/TD]
[TD]79%[/TD]
[/TR]
[TR]
[TD]Sara[/TD]
[TD]Physics [/TD]
[TD]51%[/TD]
[/TR]
</tbody>[/TABLE]


I hope that you understand me and sorry about my bad English.

Thank you so much
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
How about to use =Sheet1!A2, =Sheet1!A3, =Sheet1!A4, etc.. in the first column of months sheets?

EDIT: But any filtering or alphabetical sorting in the main sheet may cause a disaster.
 
Last edited by a moderator:
Upvote 0
thank you Flashbond for the reply,
In VBA code, I want to sort in alphabetical. If it changes in the main sheet, it will be changed in the other sheets, with out losing the data.
 
Upvote 0
LIKE This Please but for all sheets

Code:
Private Sub Worksheet_Change(ByVal Target As Range)    On Error Resume Next
    If Not Intersect(Target, Range("A:A")) Is Nothing Then
        Range("A1").Sort Key1:=Range("A2"), _
          Order1:=xlAscending, Header:=xlYes, _
          OrderCustom:=1, MatchCase:=False, _
          Orientation:=xlTopToBottom
    End If
End Sub
 
Upvote 0
How about
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
   Dim ws As Worksheet
   If Not Intersect(Target, Range("A:A")) Is Nothing Then
      For Each ws In Worksheets
         ws.Range("A1").Sort Key1:=ws.Range("A2"), _
            Order1:=xlDescending, header:=xlYes, _
            OrderCustom:=1, MatchCase:=False, _
            Orientation:=xlTopToBottom
      Next ws
   End If
End Sub
 
Upvote 0
Yes, but do not sorting the data in front of the names in the other sheets, just for the first sheet.
 
Upvote 0
I don't understand what you're saying.
But because col A in your month sheets use a formula looking at sheet Main. As soon as sheet Main is sorted, that will destroy the data on the other 3 sheets.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,329
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top