PC Review


Reply
Thread Tools Rate Thread

Display column when previous column contains data

 
 
MPSingley@midamerican.com
Guest
Posts: n/a
 
      3rd Jan 2007
The problem I have is that I have 10 years worth of data in 10 columns
and then 20 empty columns after those awaiting data entry (for the next
20 years). I was wondering if it was possible to hide these columns,
leaving only one empty column. When the header for this empty column
(the year) is filled in, I want the next empty column to be displayed.
Does anyone know if this is possible? (the columns contain many
formulas and are also called upon by other sheets.)

Thank you very much in advance if you can help!!!

Matt

 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      3rd Jan 2007
Right click sheet tab>view code>insert this>save

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row <> 1 Then Exit Sub
If Len(Target) > 1 Then _
Columns(Target.Column + 1).Hidden = False
End If
End Sub

However, you might consider adding the formulas by macro as each year is
needed. Much less overhead. You could also then change the preceeding
formulas to values for the same reason.

--
Don Guillett
SalesAid Software
(E-Mail Removed)
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> The problem I have is that I have 10 years worth of data in 10 columns
> and then 20 empty columns after those awaiting data entry (for the next
> 20 years). I was wondering if it was possible to hide these columns,
> leaving only one empty column. When the header for this empty column
> (the year) is filled in, I want the next empty column to be displayed.
> Does anyone know if this is possible? (the columns contain many
> formulas and are also called upon by other sheets.)
>
> Thank you very much in advance if you can help!!!
>
> Matt
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Based on data in previous column - sum of values in next column Beena K Microsoft Excel Worksheet Functions 1 7th Apr 2009 07:23 PM
Shortcut to select column with data in previous column =?Utf-8?B?VEpBQw==?= Microsoft Excel Misc 1 10th Jul 2007 06:12 PM
Based on a condition in one column, search for a year in another column, and display data from another column in the same row >> look MPSingley@midamerican.com Microsoft Excel Programming 2 30th Dec 2006 06:23 PM
Based on a condition in one column, search for a year in another column, and display data from another column in the same row >> look MPSingley@midamerican.com Microsoft Excel Misc 0 27th Dec 2006 04:31 PM
Copying a formula in a blank column as far as data in previous column basildon Microsoft Excel Programming 1 16th Dec 2005 03:32 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:23 PM.