Share via

Sorting across multiple sheets in excel

Anonymous
2023-03-03T20:32:17+00:00

EXCEL 365

I need to sort the same cells across multiple excel sheets

  I have 12 sheets labeled Jan through Dec.  The data is the same across each sheet, columns and rows.  When I select all twelve sheets the option to sort anything goes away.  I need to sort each row simultaneously across each of the twelve sheets based on a A to Z sort in column Q.  Is there a way to do this? The data is from from Q3 to Y33 on 12 pages named Jan through dec
Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

5 answers

Sort by: Most helpful
  1. Anonymous
    2023-03-03T21:34:10+00:00

    Thank you but unfortunately when i select all 12 sheets i don't get the option to "group sheets" only ungroup sheets. Secondly, when i do have all 12 sheets selected the "sort and filter" button, under editing on the home tab, is no longer available to select.

    5 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2023-03-03T21:27:38+00:00

    Hi P B!

    You can sort the same cells across multiple Excel sheets by using the "Group Sheets" feature in Excel.

    Please try doing this:

    1. Select all 12 sheets by clicking on the first sheet tab, then holding down the "Shift" key and clicking on the last sheet tab.
    2. Right-click on one of the selected sheet tabs and choose "Group Sheets" from the context menu. This will group all of the selected sheets together.
    3. Go to the sheet that you want to sort by column Q, and select the range of cells that you want to sort. In this case, it's Q3:Y33.
    4. Click on the "Sort & Filter" button in the "Editing" group on the "Home" tab.
    5. In the "Sort & Filter" dropdown menu, choose "Custom Sort."
    6. In the "Sort" dialog box, make sure that the "Sort by" dropdown is set to "Column Q."
    7. Choose "A to Z" as the sort order.
    8. Click "OK" to sort the data in the selected range on all of the grouped sheets simultaneously.
    9. When you're finished sorting, right-click on one of the grouped sheet tabs and choose "Ungroup Sheets" from the context menu to ungroup them.

    That's it! This method allows you to sort the same cells across multiple Excel sheets at once.

    Kindly let me know, if you require additional assistance, I will be glad to help further.

    Best Regards, Shakiru

    2 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2023-03-03T22:31:04+00:00

    I need to keep all 12 sheets separate Thank you

    1 person found this answer helpful.
    0 comments No comments
  4. Anonymous
    2023-03-05T08:07:51+00:00

    Hi,

    (make a copy before you run the below vba code)

    i assume that in row 3 are headings

    Sub Sort_data_12_shts()

    '## 05-03-2023 ##

    Const strArea As String = "Q3:Y33" '<< data range

    Dim rng As Range

    Dim nCol As Long, x As Long

    nCol = Range(strArea).Columns.Count

    Dim v As Variant, vv As Variant

    v = Array**("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")** '<< sht names

    For Each vv In v

    For x = 1 To nCol

    Set rng = Sheets(vv).Range(strArea).Columns(x)

    rng.Sort Key1:=rng.Item(1), Order1:=xlAscending, Header:=xlYes, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

    Next x

    Next vv

    End Sub

    ===================================

    step1

    Save  your Workbook with extension .xlsm (macros enabled workbook)

    Step2

    2a) press ALT+F11 to open Visual Basic

    2b) from the ribbon, select: Insert > Module and paste the code above on the right 

    pic

    2c) Press ALT+Q to Close Visual Basic

    Step3

    To run the macro, press ALT+F8, 

    select '**Sort_data_12_shts'**from the list and click the run button.

    or

    add a button and assign the  vba macro

    0 comments No comments
  5. Anonymous
    2023-03-03T22:29:28+00:00

    how about merge 12 sheets to one sheet and then sort?

    power query or other ways can provide merge sheets.

    0 comments No comments