Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Place this code in the module for the sheet in question.
Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) Dim rng As Range If Not Intersect(Target, Range("D3:BD3")) Is Nothing Then For Each rng In Range("D3:BD3") If rng < "" Then Columns(rng.Column).Hidden = False Next rng End If End Sub Mike "Desert Piranha" wrote: Hi all, I have columns D through BD where data is pasted from another workbook, one column per week (via code). So unused columns on the right are hidden. They are not completly unused as there are rows with formulas.. Based on row 3 I am trying to: When the data (for this week as example) is pasted in then that coulmn will be unhidden. I am trying to change the 'End(xlToLeft)" to work with 'Columns D through BD' only. Cells(3, Columns.Count).End(xlToLeft).Offset(0, 1).EntireColumn.Hidden = False I can't use that, because columns to the right, BE through BF have data and that is blocking. Any direction is surely appreciated. -- Desert Piranha ------------------------------------------------------------------------ Desert Piranha's Profile: http://www.excelforum.com/member.php...o&userid=28934 View this thread: http://www.excelforum.com/showthread...hreadid=560574 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
CAN'T UNHIDE COLUMNS | Excel Discussion (Misc queries) | |||
can no longer insert new columns & unhide hidden columns | Excel Worksheet Functions | |||
columns won't unhide | Excel Discussion (Misc queries) | |||
Hide/Unhide columns using button on top over relevant columns | Excel Discussion (Misc queries) | |||
Unhide Columns A and B. | Excel Discussion (Misc queries) |