Multi-row headers and excel 2010 sort/filtering












1














I have a spreadsheet which uses 2 rows for header information and some of the columns have the 2 rows merged together as one cell. I a multiple columns merged together in the first row, but the second row underneath without the columns merged together. Filtering implicitly is assuming only 1 row of header information. Sorting has a header row check-box but that only toggles treating the first row as a header.



Is there a way to make excel treat the first two rows as headers?










share|improve this question



























    1














    I have a spreadsheet which uses 2 rows for header information and some of the columns have the 2 rows merged together as one cell. I a multiple columns merged together in the first row, but the second row underneath without the columns merged together. Filtering implicitly is assuming only 1 row of header information. Sorting has a header row check-box but that only toggles treating the first row as a header.



    Is there a way to make excel treat the first two rows as headers?










    share|improve this question

























      1












      1








      1







      I have a spreadsheet which uses 2 rows for header information and some of the columns have the 2 rows merged together as one cell. I a multiple columns merged together in the first row, but the second row underneath without the columns merged together. Filtering implicitly is assuming only 1 row of header information. Sorting has a header row check-box but that only toggles treating the first row as a header.



      Is there a way to make excel treat the first two rows as headers?










      share|improve this question













      I have a spreadsheet which uses 2 rows for header information and some of the columns have the 2 rows merged together as one cell. I a multiple columns merged together in the first row, but the second row underneath without the columns merged together. Filtering implicitly is assuming only 1 row of header information. Sorting has a header row check-box but that only toggles treating the first row as a header.



      Is there a way to make excel treat the first two rows as headers?







      microsoft-excel-2010






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 27 '12 at 15:42









      TaT

      9112




      9112






















          4 Answers
          4






          active

          oldest

          votes


















          0














          Try this:




          1. Unmerge the headers that are merged.

          2. Select your data manually, from the second row downwards.

          3. Apply the filter.

          4. Re-merge the headers.


          The filter dropdowns should stay on row 2.






          share|improve this answer





























            0














            You need to ensure that the value in advanced filter Field Range is set to include the rows below your header rows.



            You can set this value manually or use a macro to do it for you.



            EG in my spreadsheet, I have rows 1-3 as multi line headers. I constantly add rows of data below. The following macro sets the Filter Field Range to include rows 4 - to the last populated row on the spreadsheet. This ensures that any sort will treat row 3 as the header (provided you check the 'my data includes headers' checkbox)



            (I incorporate this at the end of a more complex macro, to ensure that the Field Range property is always up to date after data imports - easier than remembering to manually re-set it each time)



            Sub selector()

            Sheets("AESummary").Select
            Sheets("AESummary").Activate

            ' find last row containing data in column A (column A will always be populated in this dataset)

            Set WS = Worksheets("AESummary")
            With WS
            Set LastCellC = .Cells(.Rows.Count, "A").End(xlUp)
            LastCellRowNumber = Application.WorksheetFunction.Max(LastCellC.Row) + 1
            End With

            ' set the filter Field Range value to include Row 4 to the last populated row in the worksheet

            Rows("4:" & LastCellRowNumber).AdvancedFilter Action:=xlFilterInPlace, Unique:=False


            End Sub





            share|improve this answer































              0














              Well, better late than never



              Define a local (worksheet) name "Database" from the last header row to the last table row. That is:



              Formulas » Name Manager » New » Name:Database, Scope:{sheet name}, Refers to:{select all table and manually change first cell's row}






              share|improve this answer





























                0














                sad to say that XLS 2016 still doesnt handle this OOB.
                there is another workaround to this, which should also work with previous versions:



                separate the last header row from the other ones with an empty line and hide this one. then XLS has no trouble in recognizing this one row as he header.






                share|improve this answer





















                  Your Answer








                  StackExchange.ready(function() {
                  var channelOptions = {
                  tags: "".split(" "),
                  id: "3"
                  };
                  initTagRenderer("".split(" "), "".split(" "), channelOptions);

                  StackExchange.using("externalEditor", function() {
                  // Have to fire editor after snippets, if snippets enabled
                  if (StackExchange.settings.snippets.snippetsEnabled) {
                  StackExchange.using("snippets", function() {
                  createEditor();
                  });
                  }
                  else {
                  createEditor();
                  }
                  });

                  function createEditor() {
                  StackExchange.prepareEditor({
                  heartbeatType: 'answer',
                  autoActivateHeartbeat: false,
                  convertImagesToLinks: true,
                  noModals: true,
                  showLowRepImageUploadWarning: true,
                  reputationToPostImages: 10,
                  bindNavPrevention: true,
                  postfix: "",
                  imageUploader: {
                  brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                  contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                  allowUrls: true
                  },
                  onDemand: true,
                  discardSelector: ".discard-answer"
                  ,immediatelyShowMarkdownHelp:true
                  });


                  }
                  });














                  draft saved

                  draft discarded


















                  StackExchange.ready(
                  function () {
                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f511382%2fmulti-row-headers-and-excel-2010-sort-filtering%23new-answer', 'question_page');
                  }
                  );

                  Post as a guest















                  Required, but never shown

























                  4 Answers
                  4






                  active

                  oldest

                  votes








                  4 Answers
                  4






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes









                  0














                  Try this:




                  1. Unmerge the headers that are merged.

                  2. Select your data manually, from the second row downwards.

                  3. Apply the filter.

                  4. Re-merge the headers.


                  The filter dropdowns should stay on row 2.






                  share|improve this answer


























                    0














                    Try this:




                    1. Unmerge the headers that are merged.

                    2. Select your data manually, from the second row downwards.

                    3. Apply the filter.

                    4. Re-merge the headers.


                    The filter dropdowns should stay on row 2.






                    share|improve this answer
























                      0












                      0








                      0






                      Try this:




                      1. Unmerge the headers that are merged.

                      2. Select your data manually, from the second row downwards.

                      3. Apply the filter.

                      4. Re-merge the headers.


                      The filter dropdowns should stay on row 2.






                      share|improve this answer












                      Try this:




                      1. Unmerge the headers that are merged.

                      2. Select your data manually, from the second row downwards.

                      3. Apply the filter.

                      4. Re-merge the headers.


                      The filter dropdowns should stay on row 2.







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Nov 27 '12 at 18:57









                      benshepherd

                      1,302717




                      1,302717

























                          0














                          You need to ensure that the value in advanced filter Field Range is set to include the rows below your header rows.



                          You can set this value manually or use a macro to do it for you.



                          EG in my spreadsheet, I have rows 1-3 as multi line headers. I constantly add rows of data below. The following macro sets the Filter Field Range to include rows 4 - to the last populated row on the spreadsheet. This ensures that any sort will treat row 3 as the header (provided you check the 'my data includes headers' checkbox)



                          (I incorporate this at the end of a more complex macro, to ensure that the Field Range property is always up to date after data imports - easier than remembering to manually re-set it each time)



                          Sub selector()

                          Sheets("AESummary").Select
                          Sheets("AESummary").Activate

                          ' find last row containing data in column A (column A will always be populated in this dataset)

                          Set WS = Worksheets("AESummary")
                          With WS
                          Set LastCellC = .Cells(.Rows.Count, "A").End(xlUp)
                          LastCellRowNumber = Application.WorksheetFunction.Max(LastCellC.Row) + 1
                          End With

                          ' set the filter Field Range value to include Row 4 to the last populated row in the worksheet

                          Rows("4:" & LastCellRowNumber).AdvancedFilter Action:=xlFilterInPlace, Unique:=False


                          End Sub





                          share|improve this answer




























                            0














                            You need to ensure that the value in advanced filter Field Range is set to include the rows below your header rows.



                            You can set this value manually or use a macro to do it for you.



                            EG in my spreadsheet, I have rows 1-3 as multi line headers. I constantly add rows of data below. The following macro sets the Filter Field Range to include rows 4 - to the last populated row on the spreadsheet. This ensures that any sort will treat row 3 as the header (provided you check the 'my data includes headers' checkbox)



                            (I incorporate this at the end of a more complex macro, to ensure that the Field Range property is always up to date after data imports - easier than remembering to manually re-set it each time)



                            Sub selector()

                            Sheets("AESummary").Select
                            Sheets("AESummary").Activate

                            ' find last row containing data in column A (column A will always be populated in this dataset)

                            Set WS = Worksheets("AESummary")
                            With WS
                            Set LastCellC = .Cells(.Rows.Count, "A").End(xlUp)
                            LastCellRowNumber = Application.WorksheetFunction.Max(LastCellC.Row) + 1
                            End With

                            ' set the filter Field Range value to include Row 4 to the last populated row in the worksheet

                            Rows("4:" & LastCellRowNumber).AdvancedFilter Action:=xlFilterInPlace, Unique:=False


                            End Sub





                            share|improve this answer


























                              0












                              0








                              0






                              You need to ensure that the value in advanced filter Field Range is set to include the rows below your header rows.



                              You can set this value manually or use a macro to do it for you.



                              EG in my spreadsheet, I have rows 1-3 as multi line headers. I constantly add rows of data below. The following macro sets the Filter Field Range to include rows 4 - to the last populated row on the spreadsheet. This ensures that any sort will treat row 3 as the header (provided you check the 'my data includes headers' checkbox)



                              (I incorporate this at the end of a more complex macro, to ensure that the Field Range property is always up to date after data imports - easier than remembering to manually re-set it each time)



                              Sub selector()

                              Sheets("AESummary").Select
                              Sheets("AESummary").Activate

                              ' find last row containing data in column A (column A will always be populated in this dataset)

                              Set WS = Worksheets("AESummary")
                              With WS
                              Set LastCellC = .Cells(.Rows.Count, "A").End(xlUp)
                              LastCellRowNumber = Application.WorksheetFunction.Max(LastCellC.Row) + 1
                              End With

                              ' set the filter Field Range value to include Row 4 to the last populated row in the worksheet

                              Rows("4:" & LastCellRowNumber).AdvancedFilter Action:=xlFilterInPlace, Unique:=False


                              End Sub





                              share|improve this answer














                              You need to ensure that the value in advanced filter Field Range is set to include the rows below your header rows.



                              You can set this value manually or use a macro to do it for you.



                              EG in my spreadsheet, I have rows 1-3 as multi line headers. I constantly add rows of data below. The following macro sets the Filter Field Range to include rows 4 - to the last populated row on the spreadsheet. This ensures that any sort will treat row 3 as the header (provided you check the 'my data includes headers' checkbox)



                              (I incorporate this at the end of a more complex macro, to ensure that the Field Range property is always up to date after data imports - easier than remembering to manually re-set it each time)



                              Sub selector()

                              Sheets("AESummary").Select
                              Sheets("AESummary").Activate

                              ' find last row containing data in column A (column A will always be populated in this dataset)

                              Set WS = Worksheets("AESummary")
                              With WS
                              Set LastCellC = .Cells(.Rows.Count, "A").End(xlUp)
                              LastCellRowNumber = Application.WorksheetFunction.Max(LastCellC.Row) + 1
                              End With

                              ' set the filter Field Range value to include Row 4 to the last populated row in the worksheet

                              Rows("4:" & LastCellRowNumber).AdvancedFilter Action:=xlFilterInPlace, Unique:=False


                              End Sub






                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited Jul 24 '13 at 9:24

























                              answered Jul 24 '13 at 7:01







                              user240297






























                                  0














                                  Well, better late than never



                                  Define a local (worksheet) name "Database" from the last header row to the last table row. That is:



                                  Formulas » Name Manager » New » Name:Database, Scope:{sheet name}, Refers to:{select all table and manually change first cell's row}






                                  share|improve this answer


























                                    0














                                    Well, better late than never



                                    Define a local (worksheet) name "Database" from the last header row to the last table row. That is:



                                    Formulas » Name Manager » New » Name:Database, Scope:{sheet name}, Refers to:{select all table and manually change first cell's row}






                                    share|improve this answer
























                                      0












                                      0








                                      0






                                      Well, better late than never



                                      Define a local (worksheet) name "Database" from the last header row to the last table row. That is:



                                      Formulas » Name Manager » New » Name:Database, Scope:{sheet name}, Refers to:{select all table and manually change first cell's row}






                                      share|improve this answer












                                      Well, better late than never



                                      Define a local (worksheet) name "Database" from the last header row to the last table row. That is:



                                      Formulas » Name Manager » New » Name:Database, Scope:{sheet name}, Refers to:{select all table and manually change first cell's row}







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Jul 21 '15 at 0:01









                                      Rui Baptista

                                      1




                                      1























                                          0














                                          sad to say that XLS 2016 still doesnt handle this OOB.
                                          there is another workaround to this, which should also work with previous versions:



                                          separate the last header row from the other ones with an empty line and hide this one. then XLS has no trouble in recognizing this one row as he header.






                                          share|improve this answer


























                                            0














                                            sad to say that XLS 2016 still doesnt handle this OOB.
                                            there is another workaround to this, which should also work with previous versions:



                                            separate the last header row from the other ones with an empty line and hide this one. then XLS has no trouble in recognizing this one row as he header.






                                            share|improve this answer
























                                              0












                                              0








                                              0






                                              sad to say that XLS 2016 still doesnt handle this OOB.
                                              there is another workaround to this, which should also work with previous versions:



                                              separate the last header row from the other ones with an empty line and hide this one. then XLS has no trouble in recognizing this one row as he header.






                                              share|improve this answer












                                              sad to say that XLS 2016 still doesnt handle this OOB.
                                              there is another workaround to this, which should also work with previous versions:



                                              separate the last header row from the other ones with an empty line and hide this one. then XLS has no trouble in recognizing this one row as he header.







                                              share|improve this answer












                                              share|improve this answer



                                              share|improve this answer










                                              answered Oct 31 '17 at 11:55









                                              elonderin

                                              308




                                              308






























                                                  draft saved

                                                  draft discarded




















































                                                  Thanks for contributing an answer to Super User!


                                                  • Please be sure to answer the question. Provide details and share your research!

                                                  But avoid



                                                  • Asking for help, clarification, or responding to other answers.

                                                  • Making statements based on opinion; back them up with references or personal experience.


                                                  To learn more, see our tips on writing great answers.





                                                  Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                                  Please pay close attention to the following guidance:


                                                  • Please be sure to answer the question. Provide details and share your research!

                                                  But avoid



                                                  • Asking for help, clarification, or responding to other answers.

                                                  • Making statements based on opinion; back them up with references or personal experience.


                                                  To learn more, see our tips on writing great answers.




                                                  draft saved


                                                  draft discarded














                                                  StackExchange.ready(
                                                  function () {
                                                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f511382%2fmulti-row-headers-and-excel-2010-sort-filtering%23new-answer', 'question_page');
                                                  }
                                                  );

                                                  Post as a guest















                                                  Required, but never shown





















































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown

































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown







                                                  Popular posts from this blog

                                                  flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                                                  Mangá

                                                  Eduardo VII do Reino Unido