Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Hide all columns that span a merged cell?

I have a time sheet that has a date in Row 1 that is a merged heading of ten
columns. I would like to be able to hide the entire section(all 10 columns)
of that merged heading.

For instance:
A B C D E F G H I J K
1 4/08/2006
2 d d d d d d d d d d d

Given the date 4/08/2006, I would like to hide all the columns that compose
that section A through K. L through V would be another merged column
heading of 4/15/2006.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Hide all columns that span a merged cell?

Try

Range("A1").MergeArea.EntireColumn.Hidden = True

Change A1 to the appropriate cell.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Stuart Peters" wrote in
message
...
I have a time sheet that has a date in Row 1 that is a merged
heading of ten
columns. I would like to be able to hide the entire
section(all 10 columns)
of that merged heading.

For instance:
A B C D E F G H I J K
1 4/08/2006
2 d d d d d d d d d d d

Given the date 4/08/2006, I would like to hide all the columns
that compose
that section A through K. L through V would be another
merged column
heading of 4/15/2006.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Hide all columns that span a merged cell?

That helps with the direct question, how do I look at that entire row of
dates and only hide the date I specify? Maybe this should be separate post.

Thanks to you, I know how to hide it, but How do I find it?

"Chip Pearson" wrote:

Try

Range("A1").MergeArea.EntireColumn.Hidden = True

Change A1 to the appropriate cell.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Stuart Peters" wrote in
message
...
I have a time sheet that has a date in Row 1 that is a merged
heading of ten
columns. I would like to be able to hide the entire
section(all 10 columns)
of that merged heading.

For instance:
A B C D E F G H I J K
1 4/08/2006
2 d d d d d d d d d d d

Given the date 4/08/2006, I would like to hide all the columns
that compose
that section A through K. L through V would be another
merged column
heading of 4/15/2006.





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Hide all columns that span a merged cell?

Dim cell As Range
Set cell = Cells.Find(DateSerial(2006, 4, 8))
cell.MergeArea.EntireColumn.Hidden = True


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Stuart Peters" wrote in message
...
That helps with the direct question, how do I look at that entire row of
dates and only hide the date I specify? Maybe this should be separate

post.

Thanks to you, I know how to hide it, but How do I find it?

"Chip Pearson" wrote:

Try

Range("A1").MergeArea.EntireColumn.Hidden = True

Change A1 to the appropriate cell.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Stuart Peters" wrote in
message
...
I have a time sheet that has a date in Row 1 that is a merged
heading of ten
columns. I would like to be able to hide the entire
section(all 10 columns)
of that merged heading.

For instance:
A B C D E F G H I J K
1 4/08/2006
2 d d d d d d d d d d d

Given the date 4/08/2006, I would like to hide all the columns
that compose
that section A through K. L through V would be another
merged column
heading of 4/15/2006.







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Hide all columns that span a merged cell?

That's elegant, But I can't get it to work, Cell is set to nothing. So maybe
find isn't working.

Thanks for helping,

Stuart

Dim cell As Range
Set cell = Cells.Find(DateSerial(2006, 4, 8))
cell.MergeArea.EntireColumn.Hidden = True


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Stuart Peters" wrote in message
...
That helps with the direct question, how do I look at that entire row of
dates and only hide the date I specify? Maybe this should be separate

post.

Thanks to you, I know how to hide it, but How do I find it?

"Chip Pearson" wrote:

Try

Range("A1").MergeArea.EntireColumn.Hidden = True

Change A1 to the appropriate cell.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Stuart Peters" wrote in
message
...
I have a time sheet that has a date in Row 1 that is a merged
heading of ten
columns. I would like to be able to hide the entire
section(all 10 columns)
of that merged heading.

For instance:
A B C D E F G H I J K
1 4/08/2006
2 d d d d d d d d d d d

Given the date 4/08/2006, I would like to hide all the columns
that compose
that section A through K. L through V would be another
merged column
heading of 4/15/2006.










  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Hide all columns that span a merged cell?

That's right, that is what it is. The code should test for it

Dim cell As Range
Set cell = Cells.Find(DateSerial(2006, 4, 8))
If Not cell Is Nothing Then
cell.MergeArea.EntireColumn.Hidden = True
End If

It's not testing another sheet is it?

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Stuart Peters" wrote in message
...
That's elegant, But I can't get it to work, Cell is set to nothing. So

maybe
find isn't working.

Thanks for helping,

Stuart

Dim cell As Range
Set cell = Cells.Find(DateSerial(2006, 4, 8))
cell.MergeArea.EntireColumn.Hidden = True


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Stuart Peters" wrote in

message
...
That helps with the direct question, how do I look at that entire row

of
dates and only hide the date I specify? Maybe this should be

separate
post.

Thanks to you, I know how to hide it, but How do I find it?

"Chip Pearson" wrote:

Try

Range("A1").MergeArea.EntireColumn.Hidden = True

Change A1 to the appropriate cell.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Stuart Peters" wrote in
message
...
I have a time sheet that has a date in Row 1 that is a merged
heading of ten
columns. I would like to be able to hide the entire
section(all 10 columns)
of that merged heading.

For instance:
A B C D E F G H I J K
1 4/08/2006
2 d d d d d d d d d d d

Given the date 4/08/2006, I would like to hide all the columns
that compose
that section A through K. L through V would be another
merged column
heading of 4/15/2006.










  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Hide all columns that span a merged cell?

It's like a few friends of mine, it can't seem to find a date or a date
serial. Even if I unformat the column and search for '38815'

Set cell = Cells.Find(38815) ' This doesn't work.

If I change the column to '3881' and code to

Set cell = Cells.Fine(3881) ' This does work.




"Bob Phillips" wrote:

That's right, that is what it is. The code should test for it

Dim cell As Range
Set cell = Cells.Find(DateSerial(2006, 4, 8))
If Not cell Is Nothing Then
cell.MergeArea.EntireColumn.Hidden = True
End If

It's not testing another sheet is it?

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Stuart Peters" wrote in message
...
That's elegant, But I can't get it to work, Cell is set to nothing. So

maybe
find isn't working.

Thanks for helping,

Stuart

Dim cell As Range
Set cell = Cells.Find(DateSerial(2006, 4, 8))
cell.MergeArea.EntireColumn.Hidden = True


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Stuart Peters" wrote in

message
...
That helps with the direct question, how do I look at that entire row

of
dates and only hide the date I specify? Maybe this should be

separate
post.

Thanks to you, I know how to hide it, but How do I find it?

"Chip Pearson" wrote:

Try

Range("A1").MergeArea.EntireColumn.Hidden = True

Change A1 to the appropriate cell.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Stuart Peters" wrote in
message
...
I have a time sheet that has a date in Row 1 that is a merged
heading of ten
columns. I would like to be able to hide the entire
section(all 10 columns)
of that merged heading.

For instance:
A B C D E F G H I J K
1 4/08/2006
2 d d d d d d d d d d d

Given the date 4/08/2006, I would like to hide all the columns
that compose
that section A through K. L through V would be another
merged column
heading of 4/15/2006.











  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Hide all columns that span a merged cell?

It worked in my (limited) testing, so can I suggest you send me a copy of
the workbook?

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Stuart Peters" wrote in message
...
It's like a few friends of mine, it can't seem to find a date or a date
serial. Even if I unformat the column and search for '38815'

Set cell = Cells.Find(38815) ' This doesn't work.

If I change the column to '3881' and code to

Set cell = Cells.Fine(3881) ' This does work.




"Bob Phillips" wrote:

That's right, that is what it is. The code should test for it

Dim cell As Range
Set cell = Cells.Find(DateSerial(2006, 4, 8))
If Not cell Is Nothing Then
cell.MergeArea.EntireColumn.Hidden = True
End If

It's not testing another sheet is it?

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Stuart Peters" wrote in

message
...
That's elegant, But I can't get it to work, Cell is set to nothing.

So
maybe
find isn't working.

Thanks for helping,

Stuart

Dim cell As Range
Set cell = Cells.Find(DateSerial(2006, 4, 8))
cell.MergeArea.EntireColumn.Hidden = True


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Stuart Peters" wrote in

message
...
That helps with the direct question, how do I look at that entire

row
of
dates and only hide the date I specify? Maybe this should be

separate
post.

Thanks to you, I know how to hide it, but How do I find it?

"Chip Pearson" wrote:

Try

Range("A1").MergeArea.EntireColumn.Hidden = True

Change A1 to the appropriate cell.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Stuart Peters" wrote

in
message
...
I have a time sheet that has a date in Row 1 that is a merged
heading of ten
columns. I would like to be able to hide the entire
section(all 10 columns)
of that merged heading.

For instance:
A B C D E F G H I J K
1 4/08/2006
2 d d d d d d d d d d d

Given the date 4/08/2006, I would like to hide all the columns
that compose
that section A through K. L through V would be another
merged column
heading of 4/15/2006.













  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Hide all columns that span a merged cell?

I believe it doesn't work because L1 merged cell is a formula of the first
date + 7.

I can write a work around replacing the formulas with values...kind of
defeats the purpose of using an excel spreadsheet at that point.

Thanks again to all those who contributed.

Stuart

"Bob Phillips" wrote:

It worked in my (limited) testing, so can I suggest you send me a copy of
the workbook?

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Stuart Peters" wrote in message
...
It's like a few friends of mine, it can't seem to find a date or a date
serial. Even if I unformat the column and search for '38815'

Set cell = Cells.Find(38815) ' This doesn't work.

If I change the column to '3881' and code to

Set cell = Cells.Fine(3881) ' This does work.




"Bob Phillips" wrote:

That's right, that is what it is. The code should test for it

Dim cell As Range
Set cell = Cells.Find(DateSerial(2006, 4, 8))
If Not cell Is Nothing Then
cell.MergeArea.EntireColumn.Hidden = True
End If

It's not testing another sheet is it?

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Stuart Peters" wrote in

message
...
That's elegant, But I can't get it to work, Cell is set to nothing.

So
maybe
find isn't working.

Thanks for helping,

Stuart

Dim cell As Range
Set cell = Cells.Find(DateSerial(2006, 4, 8))
cell.MergeArea.EntireColumn.Hidden = True


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Stuart Peters" wrote in
message
...
That helps with the direct question, how do I look at that entire

row
of
dates and only hide the date I specify? Maybe this should be
separate
post.

Thanks to you, I know how to hide it, but How do I find it?

"Chip Pearson" wrote:

Try

Range("A1").MergeArea.EntireColumn.Hidden = True

Change A1 to the appropriate cell.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Stuart Peters" wrote

in
message
...
I have a time sheet that has a date in Row 1 that is a merged
heading of ten
columns. I would like to be able to hide the entire
section(all 10 columns)
of that merged heading.

For instance:
A B C D E F G H I J K
1 4/08/2006
2 d d d d d d d d d d d

Given the date 4/08/2006, I would like to hide all the columns
that compose
that section A through K. L through V would be another
merged column
heading of 4/15/2006.














Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide Columns based on a cell value Tami Excel Worksheet Functions 10 July 16th 09 06:31 PM
Autofit Merged cell Code is changing the format of my merged cells JB Excel Discussion (Misc queries) 0 August 20th 07 02:12 PM
Merged cell data tabulated in columns James Excel Worksheet Functions 4 August 19th 07 07:02 PM
Number of characters in a cell (one row, merged columns) Dajana Excel Discussion (Misc queries) 1 September 19th 05 09:30 PM
sort columns within a merged cell header Diana Excel Discussion (Misc queries) 1 August 4th 05 11:03 PM


All times are GMT +1. The time now is 11:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"