Help in selecting range of header cells excluding cell 1 and cell 2 of the table vba

seragrefaat

Board Regular
Joined
Nov 16, 2020
Messages
53
Office Version
  1. 365
Platform
  1. Windows
I want to select the header row except headers of column 1 and column 2 from a Table.
I know this is used to select the entire header row:

VBA Code:
ActiveSheet.ListObjects("Table1").HeaderRowRange.Select

how to modify it to do what i want.
thanks
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Hi & welcome to MrExcel.
How about
VBA Code:
   With ActiveSheet.ListObjects("Table1").HeaderRowRange
      .Offset(, 2).Resize(, .Columns.Count - 2).Select
   End With
 
Upvote 0
Solution
Welcome to the MrExcel Message Board!

The following is one of the methods to do what you need.
VBA Code:
With ActiveSheet.ListObjects("Table1").HeaderRowRange
    .Offset(, 2).Resize(, .Count - 2).Select
End With
 
Upvote 0
Welcome to the MrExcel Message Board!

The following is one of the methods to do what you need.
VBA Code:
With ActiveSheet.ListObjects("Table1").HeaderRowRange
    .Offset(, 2).Resize(, .Count - 2).Select
End With
Amazing, thanks
 
Upvote 0
@seragrefaat: That would be great if you could mark Fluff's post as the answer by clicking on the check mark right next to it. I'd like to remind this since you are a new member, and you might not know about it. This way, your question will be listed as a solved one in the thread list to help the future readers.

Thank you.
 
Upvote 0
@seragrefaat: That would be great if you could mark Fluff's post as the answer by clicking on the check mark right next to it. I'd like to remind this since you are a new member, and you might not know about it. This way, your question will be listed as a solved one in the thread list to help the future readers.

Thank you.
@seragrefaat: That would be great if you could mark Fluff's post as the answer by clicking on the check mark right next to it. I'd like to remind this since you are a new member, and you might not know about it. This way, your question will be listed as a solved one in the thread list to help the future readers.

Thank you.
Done, good to know.
 
Upvote 0

Forum statistics

Threads
1,213,538
Messages
6,114,217
Members
448,554
Latest member
Gleisner2

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