Multi-row headers and excel 2010 sort/filtering
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
add a comment |
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
add a comment |
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
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
microsoft-excel-2010
asked Nov 27 '12 at 15:42
TaT
9112
9112
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
Try this:
- Unmerge the headers that are merged.
- Select your data manually, from the second row downwards.
- Apply the filter.
- Re-merge the headers.
The filter dropdowns should stay on row 2.
add a comment |
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
add a comment |
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}
add a comment |
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.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Try this:
- Unmerge the headers that are merged.
- Select your data manually, from the second row downwards.
- Apply the filter.
- Re-merge the headers.
The filter dropdowns should stay on row 2.
add a comment |
Try this:
- Unmerge the headers that are merged.
- Select your data manually, from the second row downwards.
- Apply the filter.
- Re-merge the headers.
The filter dropdowns should stay on row 2.
add a comment |
Try this:
- Unmerge the headers that are merged.
- Select your data manually, from the second row downwards.
- Apply the filter.
- Re-merge the headers.
The filter dropdowns should stay on row 2.
Try this:
- Unmerge the headers that are merged.
- Select your data manually, from the second row downwards.
- Apply the filter.
- Re-merge the headers.
The filter dropdowns should stay on row 2.
answered Nov 27 '12 at 18:57
benshepherd
1,302717
1,302717
add a comment |
add a comment |
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
add a comment |
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
add a comment |
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
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
edited Jul 24 '13 at 9:24
answered Jul 24 '13 at 7:01
user240297
add a comment |
add a comment |
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}
add a comment |
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}
add a comment |
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}
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}
answered Jul 21 '15 at 0:01
Rui Baptista
1
1
add a comment |
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered Oct 31 '17 at 11:55
elonderin
308
308
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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