NotBillGates
New Member
- Joined
- Jul 1, 2016
- Messages
- 13
Hi
If I have a worksheet with three columns A, B and C. I can write a macro
Columns ("B":"C").Select
Selection.EntireColumn.Hidden = True
If I insert new column B the data in B and C moves to C&D if you know what I mean
How do I get my macro to hide the new C&D?
I have tried defining the column reference in a cell using
SUBSTITUTE(ADDRESS(1,COLUMN(B2),4),"1","")
and then using it in a string but it doesn't work.
Would the same solution work for rows?
Thanks in advance
If I have a worksheet with three columns A, B and C. I can write a macro
Columns ("B":"C").Select
Selection.EntireColumn.Hidden = True
If I insert new column B the data in B and C moves to C&D if you know what I mean
How do I get my macro to hide the new C&D?
I have tried defining the column reference in a cell using
SUBSTITUTE(ADDRESS(1,COLUMN(B2),4),"1","")
and then using it in a string but it doesn't work.
Would the same solution work for rows?
Thanks in advance