Hide rows of cells that are blank

G

Guest

How can I hide rows of cells that are blank. Example cell A3, A5, A7, A10 are
blank. I want to hide those rows. There are othere cells in Column A that are
blank but I dont want to hide those rows.
 
G

Guest

One way would be to use data filtering - click the 'A' column indicator at
the top of the column, then from the menu bar, choose
Data | Filtering | Auto Filter
then use the drop-down list that will appear as part of the first cell and
look for the entry that says "Non Blanks" - click that and all rows with
empty cells in column A will be hidden. To get them back either turn Auto
Filtering off, or choose [All] from the drop down.

Another way is to again choose column A and then use
Edit | Find and click the [Special] button and choose the [Blanks] option.
After those are chosen, use Format | Rows | Hide and again the rows with
blanks in column A will be hidden. To get them back from this setup, choose
any column (but A would seem the logical choice) and Format | Rows | Unhide.

Hope this helps some.
 
G

Guest

I understand what you are saying. However I don't want to hide the rows of
all the blank cells. Just selected ones.

JLatham said:
One way would be to use data filtering - click the 'A' column indicator at
the top of the column, then from the menu bar, choose
Data | Filtering | Auto Filter
then use the drop-down list that will appear as part of the first cell and
look for the entry that says "Non Blanks" - click that and all rows with
empty cells in column A will be hidden. To get them back either turn Auto
Filtering off, or choose [All] from the drop down.

Another way is to again choose column A and then use
Edit | Find and click the [Special] button and choose the [Blanks] option.
After those are chosen, use Format | Rows | Hide and again the rows with
blanks in column A will be hidden. To get them back from this setup, choose
any column (but A would seem the logical choice) and Format | Rows | Unhide.

Hope this helps some.

dford said:
How can I hide rows of cells that are blank. Example cell A3, A5, A7, A10 are
blank. I want to hide those rows. There are othere cells in Column A that are
blank but I dont want to hide those rows.
 
D

David Biddulph

Hold down the control key while you select the group of rows, then
right-click/ Hide.
--
David Biddulph

dford said:
I understand what you are saying. However I don't want to hide the rows of
all the blank cells. Just selected ones.
JLatham said:
One way would be to use data filtering - click the 'A' column indicator
at
the top of the column, then from the menu bar, choose
Data | Filtering | Auto Filter
then use the drop-down list that will appear as part of the first cell
and
look for the entry that says "Non Blanks" - click that and all rows with
empty cells in column A will be hidden. To get them back either turn
Auto
Filtering off, or choose [All] from the drop down.

Another way is to again choose column A and then use
Edit | Find and click the [Special] button and choose the [Blanks]
option.
After those are chosen, use Format | Rows | Hide and again the rows with
blanks in column A will be hidden. To get them back from this setup,
choose
any column (but A would seem the logical choice) and Format | Rows |
Unhide.

Hope this helps some.
dford said:
How can I hide rows of cells that are blank. Example cell A3, A5, A7,
A10 are
blank. I want to hide those rows. There are othere cells in Column A
that are
blank but I dont want to hide those rows.
 
G

Guest

The only problem is I don't want to do this manually. I want to hide the rows
of only some blank cells in the column. Others in the same column can be
blank but I don't want to hide them. I only want to hide the rows of cells in
the column that I have selected and they are blank.

David Biddulph said:
Hold down the control key while you select the group of rows, then
right-click/ Hide.
--
David Biddulph

dford said:
I understand what you are saying. However I don't want to hide the rows of
all the blank cells. Just selected ones.
JLatham said:
One way would be to use data filtering - click the 'A' column indicator
at
the top of the column, then from the menu bar, choose
Data | Filtering | Auto Filter
then use the drop-down list that will appear as part of the first cell
and
look for the entry that says "Non Blanks" - click that and all rows with
empty cells in column A will be hidden. To get them back either turn
Auto
Filtering off, or choose [All] from the drop down.

Another way is to again choose column A and then use
Edit | Find and click the [Special] button and choose the [Blanks]
option.
After those are chosen, use Format | Rows | Hide and again the rows with
blanks in column A will be hidden. To get them back from this setup,
choose
any column (but A would seem the logical choice) and Format | Rows |
Unhide.

Hope this helps some.
:

How can I hide rows of cells that are blank. Example cell A3, A5, A7,
A10 are
blank. I want to hide those rows. There are othere cells in Column A
that are
blank but I dont want to hide those rows.
 
D

David Biddulph

I'm sorry, I don't understand. How are you selecting them, other than the
means by which I suggested?
--
David Biddulph

dford said:
The only problem is I don't want to do this manually. I want to hide the
rows
of only some blank cells in the column. Others in the same column can be
blank but I don't want to hide them. I only want to hide the rows of cells
in
the column that I have selected and they are blank.
David Biddulph said:
Hold down the control key while you select the group of rows, then
right-click/ Hide.
dford said:
I understand what you are saying. However I don't want to hide the rows
of
all the blank cells. Just selected ones.
:

One way would be to use data filtering - click the 'A' column
indicator
at
the top of the column, then from the menu bar, choose
Data | Filtering | Auto Filter
then use the drop-down list that will appear as part of the first cell
and
look for the entry that says "Non Blanks" - click that and all rows
with
empty cells in column A will be hidden. To get them back either turn
Auto
Filtering off, or choose [All] from the drop down.

Another way is to again choose column A and then use
Edit | Find and click the [Special] button and choose the [Blanks]
option.
After those are chosen, use Format | Rows | Hide and again the rows
with
blanks in column A will be hidden. To get them back from this setup,
choose
any column (but A would seem the logical choice) and Format | Rows |
Unhide.

Hope this helps some.
:

How can I hide rows of cells that are blank. Example cell A3, A5,
A7,
A10 are
blank. I want to hide those rows. There are othere cells in Column A
that are
blank but I dont want to hide those rows.
 
G

Guest

I would like to create a macro that says: If cell A3, A5, A7, and A10 are
blank, then hide those rows. Cell A1, A2, A4, A6, A8, and A9 COULD be blank
but don't do anything with them.

David Biddulph said:
I'm sorry, I don't understand. How are you selecting them, other than the
means by which I suggested?
--
David Biddulph

dford said:
The only problem is I don't want to do this manually. I want to hide the
rows
of only some blank cells in the column. Others in the same column can be
blank but I don't want to hide them. I only want to hide the rows of cells
in
the column that I have selected and they are blank.
David Biddulph said:
Hold down the control key while you select the group of rows, then
right-click/ Hide.
I understand what you are saying. However I don't want to hide the rows
of
all the blank cells. Just selected ones.

:

One way would be to use data filtering - click the 'A' column
indicator
at
the top of the column, then from the menu bar, choose
Data | Filtering | Auto Filter
then use the drop-down list that will appear as part of the first cell
and
look for the entry that says "Non Blanks" - click that and all rows
with
empty cells in column A will be hidden. To get them back either turn
Auto
Filtering off, or choose [All] from the drop down.

Another way is to again choose column A and then use
Edit | Find and click the [Special] button and choose the [Blanks]
option.
After those are chosen, use Format | Rows | Hide and again the rows
with
blanks in column A will be hidden. To get them back from this setup,
choose
any column (but A would seem the logical choice) and Format | Rows |
Unhide.

Hope this helps some.

:

How can I hide rows of cells that are blank. Example cell A3, A5,
A7,
A10 are
blank. I want to hide those rows. There are othere cells in Column A
that are
blank but I dont want to hide those rows.
 
G

Guest

Are the cells that are "if" cells (A3, A5, A7, A10) always the same cells, or
could there be a time when you want to look at others also to see if you want
to hide them?
If it is always a constant group, then the code is pretty straight forward
(but we must also determine if each cell is to be considered individually,
hiding each row if that cell is empty; or as a group, hiding them only if all
of the cells in the group are empty.

here is code that will handle the two situations
Sub HideIndividualRows()
'hides individual rows based on cell being empty or not
Dim rangeToTest As Range
Dim anyCell As Object

Set rangeToTest = Union(Range("A1"), Range("A3"), _
Range("A5"), Range("A10"))
For Each anyCell In rangeToTest
If IsEmpty(anyCell) Then
anyCell.EntireRow.Hidden = True
End If
Next

End Sub

Sub HideIfAllEmpty()
'hides all rows ONLY if all cells in the range are empty
Dim rangeToTest As Range

Set rangeToTest = Union(Range("A1"), Range("A3"), _
Range("A5"), Range("A10"))

If IsEmpty(rangeToTest) Then
rangeToTest.EntireRow.Hidden = True
End If
End Sub


dford said:
I would like to create a macro that says: If cell A3, A5, A7, and A10 are
blank, then hide those rows. Cell A1, A2, A4, A6, A8, and A9 COULD be blank
but don't do anything with them.

David Biddulph said:
I'm sorry, I don't understand. How are you selecting them, other than the
means by which I suggested?
--
David Biddulph

dford said:
The only problem is I don't want to do this manually. I want to hide the
rows
of only some blank cells in the column. Others in the same column can be
blank but I don't want to hide them. I only want to hide the rows of cells
in
the column that I have selected and they are blank.
:

Hold down the control key while you select the group of rows, then
right-click/ Hide.
I understand what you are saying. However I don't want to hide the rows
of
all the blank cells. Just selected ones.

:

One way would be to use data filtering - click the 'A' column
indicator
at
the top of the column, then from the menu bar, choose
Data | Filtering | Auto Filter
then use the drop-down list that will appear as part of the first cell
and
look for the entry that says "Non Blanks" - click that and all rows
with
empty cells in column A will be hidden. To get them back either turn
Auto
Filtering off, or choose [All] from the drop down.

Another way is to again choose column A and then use
Edit | Find and click the [Special] button and choose the [Blanks]
option.
After those are chosen, use Format | Rows | Hide and again the rows
with
blanks in column A will be hidden. To get them back from this setup,
choose
any column (but A would seem the logical choice) and Format | Rows |
Unhide.

Hope this helps some.

:

How can I hide rows of cells that are blank. Example cell A3, A5,
A7,
A10 are
blank. I want to hide those rows. There are othere cells in Column A
that are
blank but I dont want to hide those rows.
 
D

David Biddulph

In which case record a macro to do what I said.
--
David Biddulph

dford said:
I would like to create a macro that says: If cell A3, A5, A7, and A10 are
blank, then hide those rows. Cell A1, A2, A4, A6, A8, and A9 COULD be
blank
but don't do anything with them.
David Biddulph said:
I'm sorry, I don't understand. How are you selecting them, other than
the
means by which I suggested?
dford said:
The only problem is I don't want to do this manually. I want to hide
the
rows
of only some blank cells in the column. Others in the same column can
be
blank but I don't want to hide them. I only want to hide the rows of
cells
in
the column that I have selected and they are blank.
:

Hold down the control key while you select the group of rows, then
right-click/ Hide.
I understand what you are saying. However I don't want to hide the
rows
of
all the blank cells. Just selected ones.

:

One way would be to use data filtering - click the 'A' column
indicator
at
the top of the column, then from the menu bar, choose
Data | Filtering | Auto Filter
then use the drop-down list that will appear as part of the first
cell
and
look for the entry that says "Non Blanks" - click that and all rows
with
empty cells in column A will be hidden. To get them back either
turn
Auto
Filtering off, or choose [All] from the drop down.

Another way is to again choose column A and then use
Edit | Find and click the [Special] button and choose the [Blanks]
option.
After those are chosen, use Format | Rows | Hide and again the rows
with
blanks in column A will be hidden. To get them back from this
setup,
choose
any column (but A would seem the logical choice) and Format | Rows
|
Unhide.

Hope this helps some.

:

How can I hide rows of cells that are blank. Example cell A3, A5,
A7,
A10 are
blank. I want to hide those rows. There are othere cells in
Column A
that are
blank but I dont want to hide those rows.
 
G

Guest

Thanks for the help. Your first option did the trick

JLatham said:
Are the cells that are "if" cells (A3, A5, A7, A10) always the same cells, or
could there be a time when you want to look at others also to see if you want
to hide them?
If it is always a constant group, then the code is pretty straight forward
(but we must also determine if each cell is to be considered individually,
hiding each row if that cell is empty; or as a group, hiding them only if all
of the cells in the group are empty.

here is code that will handle the two situations
Sub HideIndividualRows()
'hides individual rows based on cell being empty or not
Dim rangeToTest As Range
Dim anyCell As Object

Set rangeToTest = Union(Range("A1"), Range("A3"), _
Range("A5"), Range("A10"))
For Each anyCell In rangeToTest
If IsEmpty(anyCell) Then
anyCell.EntireRow.Hidden = True
End If
Next

End Sub

Sub HideIfAllEmpty()
'hides all rows ONLY if all cells in the range are empty
Dim rangeToTest As Range

Set rangeToTest = Union(Range("A1"), Range("A3"), _
Range("A5"), Range("A10"))

If IsEmpty(rangeToTest) Then
rangeToTest.EntireRow.Hidden = True
End If
End Sub


dford said:
I would like to create a macro that says: If cell A3, A5, A7, and A10 are
blank, then hide those rows. Cell A1, A2, A4, A6, A8, and A9 COULD be blank
but don't do anything with them.

David Biddulph said:
I'm sorry, I don't understand. How are you selecting them, other than the
means by which I suggested?
--
David Biddulph

The only problem is I don't want to do this manually. I want to hide the
rows
of only some blank cells in the column. Others in the same column can be
blank but I don't want to hide them. I only want to hide the rows of cells
in
the column that I have selected and they are blank.

:

Hold down the control key while you select the group of rows, then
right-click/ Hide.

I understand what you are saying. However I don't want to hide the rows
of
all the blank cells. Just selected ones.

:

One way would be to use data filtering - click the 'A' column
indicator
at
the top of the column, then from the menu bar, choose
Data | Filtering | Auto Filter
then use the drop-down list that will appear as part of the first cell
and
look for the entry that says "Non Blanks" - click that and all rows
with
empty cells in column A will be hidden. To get them back either turn
Auto
Filtering off, or choose [All] from the drop down.

Another way is to again choose column A and then use
Edit | Find and click the [Special] button and choose the [Blanks]
option.
After those are chosen, use Format | Rows | Hide and again the rows
with
blanks in column A will be hidden. To get them back from this setup,
choose
any column (but A would seem the logical choice) and Format | Rows |
Unhide.

Hope this helps some.

:

How can I hide rows of cells that are blank. Example cell A3, A5,
A7,
A10 are
blank. I want to hide those rows. There are othere cells in Column A
that are
blank but I dont want to hide those rows.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top