Ensure/force that a header (cell) is selected row of headers (dynamic range)

Eric Carolus

Board Regular
Joined
Sep 17, 2012
Messages
133
Office Version
  1. 2016
Platform
  1. Windows
Hallo gurus

I can now insert a new column with its own header into a row of headers (thanks to help on this forum).
The new column (for which I will add a header) will be inserted to the left of an
existing column with header.

My problem how do I ensure that a header cell is selected and not any other cell
on the worksheet"? (Sheet1)

I can use all help I can get. https://www.dropbox.com/s/qy1gduz7bijiyq3/Insert a column.xlsm?dl=0

Thanks

Eric
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Do you want to add the new column added before a specific header?
 
Upvote 0
Hi Fluff

No. The column can be inserted anywhere WITHIN the header range.
Preferably not before B1 as I copy the formats from this column to
subsequent columns.

Thank you.

Eric
 
Upvote 0
In that case how about
Code:
Sub EricCarolus()
   Sheets("sheet1").Range("C:C").EntireColumn.Insert
End Sub
 
Upvote 0
Hi Fluff

It certainly works. But how do I ensure that
a selection is made from the header row ONLY?

Thank you.

Eric
 
Upvote 0
I'm afraid I don't understand what your asking
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

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