ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Excel (https://www.excelbanter.com/excel-discussion-misc-queries/127491-excel.html)

cdstorage

Excel
 
I want to set up a logical condition : If a specific cell is blank then hide
row.

Can this be done and how would you recommend implementing


Dave F

Excel
 
You would need a macro to do that.

Here's an example of a macro that hides rows:

Sub HideRow()
'Hides rows 1:2
Rows("1:2").Select
Selection.EntireRow.Hidden = True
End Sub

--
Brevity is the soul of wit.


"cdstorage" wrote:

I want to set up a logical condition : If a specific cell is blank then hide
row.

Can this be done and how would you recommend implementing


Dave F

Excel
 
I neglected to include the test for a blank cell in my original post.

Assume you put a formula in cell B5 that tests whether B2 is blank, and if
B2 is blank, you have a 1 entered in B5: =IF(ISBLANK(B2),1,""). Then you can
use the following macro to hide rows 1:2

Sub Hiderows()
If Range("B5") = 1 Then
Rows("1:2").Select
Selection.EntireRow.Hidden = True
Else
Rows("1:2").Select
Selection.EntireRow.Hidden = False
End If
End Sub


--
Brevity is the soul of wit.


"cdstorage" wrote:

I want to set up a logical condition : If a specific cell is blank then hide
row.

Can this be done and how would you recommend implementing


cdstorage

Excel
 
Dave
What is I'm looking for all cells in column a that are blank and if true I
want to hide the entire row

"Dave F" wrote:

You would need a macro to do that.

Here's an example of a macro that hides rows:

Sub HideRow()
'Hides rows 1:2
Rows("1:2").Select
Selection.EntireRow.Hidden = True
End Sub

--
Brevity is the soul of wit.


"cdstorage" wrote:

I want to set up a logical condition : If a specific cell is blank then hide
row.

Can this be done and how would you recommend implementing


David Biddulph

Excel
 
Auto-filter the range, and Show non-blanks?
--
David Biddulph

"cdstorage" wrote in message
...
I want to set up a logical condition : If a specific cell is blank then
hide
row.

Can this be done and how would you recommend implementing




cdstorage

Excel
 
Dave
A little more help if you can

I need to look at all cells in column a & b, for blanks, if cell a% and cell
b% tehn hide row


"Dave F" wrote:

I neglected to include the test for a blank cell in my original post.

Assume you put a formula in cell B5 that tests whether B2 is blank, and if
B2 is blank, you have a 1 entered in B5: =IF(ISBLANK(B2),1,""). Then you can
use the following macro to hide rows 1:2

Sub Hiderows()
If Range("B5") = 1 Then
Rows("1:2").Select
Selection.EntireRow.Hidden = True
Else
Rows("1:2").Select
Selection.EntireRow.Hidden = False
End If
End Sub


--
Brevity is the soul of wit.


"cdstorage" wrote:

I want to set up a logical condition : If a specific cell is blank then hide
row.

Can this be done and how would you recommend implementing



All times are GMT +1. The time now is 04:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com