Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Help to hide rows, SpecialCells(xlCellTypeBlanks) doesn't work...

Hi,
I try to hide all rows exept them with A:A cells with values. I have
formulas in the cells and if the formula give "" the row should be hidden.
The formulas are references to other cells in other sheets, like "
='Sheet2'!B10 " and the reference cells are also formulas, if that matter.

I have tried with
Blad102.Range("A737:A835").SpecialCells(xlCellType Blanks).EntireRow.Hidden =
True

It doesn't work because xlCellTypeBlanks consider formulas to be "not
blanks", I guess.

The 'Sheet2'!B10 and similar cells will contain either text or ""
If 'Sheet2'!B10 gives value "" the A:A cell should be hidden, else it
shuold be visible

In some A:A cells I have manually using a few space strikes to be ensured
the rows always should be visible.

Any suggestions?

/Regards


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Help to hide rows, SpecialCells(xlCellTypeBlanks) doesn't work...

You need to test for .Value = ""
Mike F
"Gunnar Johansson" wrote in message
...
Hi,
I try to hide all rows exept them with A:A cells with values. I have
formulas in the cells and if the formula give "" the row should be hidden.
The formulas are references to other cells in other sheets, like "
='Sheet2'!B10 " and the reference cells are also formulas, if that matter.

I have tried with
Blad102.Range("A737:A835").SpecialCells(xlCellType Blanks).EntireRow.Hidden

=
True

It doesn't work because xlCellTypeBlanks consider formulas to be "not
blanks", I guess.

The 'Sheet2'!B10 and similar cells will contain either text or ""
If 'Sheet2'!B10 gives value "" the A:A cell should be hidden, else it
shuold be visible

In some A:A cells I have manually using a few space strikes to be ensured
the rows always should be visible.

Any suggestions?

/Regards




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Help to hide rows, SpecialCells(xlCellTypeBlanks) doesn't work...

Thank you for the answer.

But then I need a For Each Next Loop and I already have one like that
running. I would need a quicker one like a "SpecialcCell" operation. Aren't
there any other possibilities?

/Regards


"Mike Fogleman" skrev i meddelandet
news:I2JSc.134985$eM2.30210@attbi_s51...
You need to test for .Value = ""
Mike F
"Gunnar Johansson" wrote in message
...
Hi,
I try to hide all rows exept them with A:A cells with values. I have
formulas in the cells and if the formula give "" the row should be

hidden.
The formulas are references to other cells in other sheets, like "
='Sheet2'!B10 " and the reference cells are also formulas, if that

matter.

I have tried with

Blad102.Range("A737:A835").SpecialCells(xlCellType Blanks).EntireRow.Hidden
=
True

It doesn't work because xlCellTypeBlanks consider formulas to be "not
blanks", I guess.

The 'Sheet2'!B10 and similar cells will contain either text or ""
If 'Sheet2'!B10 gives value "" the A:A cell should be hidden, else it
shuold be visible

In some A:A cells I have manually using a few space strikes to be

ensured
the rows always should be visible.

Any suggestions?

/Regards






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Help to hide rows, SpecialCells(xlCellTypeBlanks) doesn't work...

How about applying Data|filter|autofilter and showing just the non-blanks.



Gunnar Johansson wrote:

Thank you for the answer.

But then I need a For Each Next Loop and I already have one like that
running. I would need a quicker one like a "SpecialcCell" operation. Aren't
there any other possibilities?

/Regards

"Mike Fogleman" skrev i meddelandet
news:I2JSc.134985$eM2.30210@attbi_s51...
You need to test for .Value = ""
Mike F
"Gunnar Johansson" wrote in message
...
Hi,
I try to hide all rows exept them with A:A cells with values. I have
formulas in the cells and if the formula give "" the row should be

hidden.
The formulas are references to other cells in other sheets, like "
='Sheet2'!B10 " and the reference cells are also formulas, if that

matter.

I have tried with

Blad102.Range("A737:A835").SpecialCells(xlCellType Blanks).EntireRow.Hidden
=
True

It doesn't work because xlCellTypeBlanks consider formulas to be "not
blanks", I guess.

The 'Sheet2'!B10 and similar cells will contain either text or ""
If 'Sheet2'!B10 gives value "" the A:A cell should be hidden, else it
shuold be visible

In some A:A cells I have manually using a few space strikes to be

ensured
the rows always should be visible.

Any suggestions?

/Regards





--

Dave Peterson

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Help to hide rows, SpecialCells(xlCellTypeBlanks) doesn't work...

I thought of that...maybe. But the rows are used in a report and I don't
know if the tabel is looking good with the big fat "arrowbuttons" hanging on
each headline. Actully, one of the headlines of one of the smaller columns
is compleatly hidden.

Are there a way to hide the arrow buttons at the headline???

And it is three different tables that should be filtered in the same
worksheet, with text between, is this possible? I belive it's only one
filter function in a sheet, or? The information is liked to three different
sheets, so I might do the filering there - but I'm not sure how I can paste
it /link it / code it to the report when it is a variable amount of rows in
the three tables and the filtered tables had to follow each other without
any empty rows etc, just a number of rows with text between...

Suggestions?


/Regards



"Dave Peterson" skrev i meddelandet
...
How about applying Data|filter|autofilter and showing just the non-blanks.



Gunnar Johansson wrote:

Thank you for the answer.

But then I need a For Each Next Loop and I already have one like that
running. I would need a quicker one like a "SpecialcCell" operation.

Aren't
there any other possibilities?

/Regards

"Mike Fogleman" skrev i meddelandet
news:I2JSc.134985$eM2.30210@attbi_s51...
You need to test for .Value = ""
Mike F
"Gunnar Johansson" wrote in message
...
Hi,
I try to hide all rows exept them with A:A cells with values. I have
formulas in the cells and if the formula give "" the row should be

hidden.
The formulas are references to other cells in other sheets, like "
='Sheet2'!B10 " and the reference cells are also formulas, if that

matter.

I have tried with


Blad102.Range("A737:A835").SpecialCells(xlCellType Blanks).EntireRow.Hidden
=
True

It doesn't work because xlCellTypeBlanks consider formulas to be

"not
blanks", I guess.

The 'Sheet2'!B10 and similar cells will contain either text or ""
If 'Sheet2'!B10 gives value "" the A:A cell should be hidden, else

it
shuold be visible

In some A:A cells I have manually using a few space strikes to be

ensured
the rows always should be visible.

Any suggestions?

/Regards





--

Dave Peterson





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Help to hide rows, SpecialCells(xlCellTypeBlanks) doesn't work...

You're right--one filter (many columns, though) per worksheet (at a time!).

You can hide the dropdown buttons in code. Debra Dalgleish has a sample at:
http://www.contextures.com/xlautofilter03.html#Hide

She has lots of sample code to work with filtered data on that page.

You could apply the filter, filter the data, copy the visible cells, paste to
new location.

and do it twice more.



Gunnar Johansson wrote:

I thought of that...maybe. But the rows are used in a report and I don't
know if the tabel is looking good with the big fat "arrowbuttons" hanging on
each headline. Actully, one of the headlines of one of the smaller columns
is compleatly hidden.

Are there a way to hide the arrow buttons at the headline???

And it is three different tables that should be filtered in the same
worksheet, with text between, is this possible? I belive it's only one
filter function in a sheet, or? The information is liked to three different
sheets, so I might do the filering there - but I'm not sure how I can paste
it /link it / code it to the report when it is a variable amount of rows in
the three tables and the filtered tables had to follow each other without
any empty rows etc, just a number of rows with text between...

Suggestions?

/Regards

"Dave Peterson" skrev i meddelandet
...
How about applying Data|filter|autofilter and showing just the non-blanks.



Gunnar Johansson wrote:

Thank you for the answer.

But then I need a For Each Next Loop and I already have one like that
running. I would need a quicker one like a "SpecialcCell" operation.

Aren't
there any other possibilities?

/Regards

"Mike Fogleman" skrev i meddelandet
news:I2JSc.134985$eM2.30210@attbi_s51...
You need to test for .Value = ""
Mike F
"Gunnar Johansson" wrote in message
...
Hi,
I try to hide all rows exept them with A:A cells with values. I have
formulas in the cells and if the formula give "" the row should be
hidden.
The formulas are references to other cells in other sheets, like "
='Sheet2'!B10 " and the reference cells are also formulas, if that
matter.

I have tried with


Blad102.Range("A737:A835").SpecialCells(xlCellType Blanks).EntireRow.Hidden
=
True

It doesn't work because xlCellTypeBlanks consider formulas to be

"not
blanks", I guess.

The 'Sheet2'!B10 and similar cells will contain either text or ""
If 'Sheet2'!B10 gives value "" the A:A cell should be hidden, else

it
shuold be visible

In some A:A cells I have manually using a few space strikes to be
ensured
the rows always should be visible.

Any suggestions?

/Regards





--

Dave Peterson


--

Dave Peterson

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Help to hide rows, SpecialCells(xlCellTypeBlanks) doesn't work...

Thank you, it's running fine now, by autofilering in other sheets and using
PasteSpecial (xlPasteValues) to the new location.


/Regards

"Dave Peterson" skrev i meddelandet
...
You're right--one filter (many columns, though) per worksheet (at a

time!).

You can hide the dropdown buttons in code. Debra Dalgleish has a sample

at:
http://www.contextures.com/xlautofilter03.html#Hide

She has lots of sample code to work with filtered data on that page.

You could apply the filter, filter the data, copy the visible cells, paste

to
new location.

and do it twice more.



Gunnar Johansson wrote:

I thought of that...maybe. But the rows are used in a report and I don't
know if the tabel is looking good with the big fat "arrowbuttons"

hanging on
each headline. Actully, one of the headlines of one of the smaller

columns
is compleatly hidden.

Are there a way to hide the arrow buttons at the headline???

And it is three different tables that should be filtered in the same
worksheet, with text between, is this possible? I belive it's only one
filter function in a sheet, or? The information is liked to three

different
sheets, so I might do the filering there - but I'm not sure how I can

paste
it /link it / code it to the report when it is a variable amount of rows

in
the three tables and the filtered tables had to follow each other

without
any empty rows etc, just a number of rows with text between...

Suggestions?

/Regards

"Dave Peterson" skrev i meddelandet
...
How about applying Data|filter|autofilter and showing just the

non-blanks.



Gunnar Johansson wrote:

Thank you for the answer.

But then I need a For Each Next Loop and I already have one like

that
running. I would need a quicker one like a "SpecialcCell" operation.

Aren't
there any other possibilities?

/Regards

"Mike Fogleman" skrev i meddelandet
news:I2JSc.134985$eM2.30210@attbi_s51...
You need to test for .Value = ""
Mike F
"Gunnar Johansson" wrote in message
...
Hi,
I try to hide all rows exept them with A:A cells with values. I

have
formulas in the cells and if the formula give "" the row should

be
hidden.
The formulas are references to other cells in other sheets, like

"
='Sheet2'!B10 " and the reference cells are also formulas, if

that
matter.

I have tried with



Blad102.Range("A737:A835").SpecialCells(xlCellType Blanks).EntireRow.Hidden
=
True

It doesn't work because xlCellTypeBlanks consider formulas to be

"not
blanks", I guess.

The 'Sheet2'!B10 and similar cells will contain either text or

""
If 'Sheet2'!B10 gives value "" the A:A cell should be hidden,

else
it
shuold be visible

In some A:A cells I have manually using a few space strikes to

be
ensured
the rows always should be visible.

Any suggestions?

/Regards





--

Dave Peterson


--

Dave Peterson



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
Enabling option „Format rows“ to hide/unhide rows using VBA-code? ran58 Excel Discussion (Misc queries) 0 July 28th 09 03:46 PM
Work around to SpecialCells(xlCellTypeBlanks)... DanF Excel Discussion (Misc queries) 7 June 29th 08 07:36 AM
VBA ON ERROR does not work with SPECIALCELLS Felix Excel Discussion (Misc queries) 2 April 14th 05 10:43 PM
SpecialCells Doesn't Work in a Function?? Alex J Excel Programming 2 December 3rd 03 08:37 PM
specialcells(xlcelltypeblanks) Neil[_11_] Excel Programming 5 October 9th 03 10:11 AM


All times are GMT +1. The time now is 12:07 AM.

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

About Us

"It's about Microsoft Excel"