Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Hide Columns Using Numbered References
I'm trying to hide columns in a sheet using references to "numbered
columns" instead of "lettered" columns, but I can't figure out the correct syntax. Someone please help. Thanks Sub TestCount() Dim MyCount MyCount = Range("A1").Value * 2 + 3 MyEndRange = 256 Columns("MyCount:MyEndRange").Hidden = True End Sub |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Hide Columns Using Numbered References
Columns(MyCount & ":" & MyEndRange).Hidden = True
wrote: I'm trying to hide columns in a sheet using references to "numbered columns" instead of "lettered" columns, but I can't figure out the correct syntax. Someone please help. Thanks Sub TestCount() Dim MyCount MyCount = Range("A1").Value * 2 + 3 MyEndRange = 256 Columns("MyCount:MyEndRange").Hidden = True End Sub -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hide Rows / Columns - complex question | Excel Worksheet Functions | |||
Hide columns & rows that contain "0" or blank in a range of cells | Excel Worksheet Functions | |||
Getting Excel error when trying to hide columns. Why? | Excel Discussion (Misc queries) | |||
Removing columns (not hide or white-out). | Excel Worksheet Functions | |||
Hide Cell Content if no data in previous columns | Excel Discussion (Misc queries) |