Hidden Rows

C

Curt

Is there a way to hide a row till information is entered?

Example: If cell c1 > 0 then rows 7 through 10 will be visible else they
will be hidden.
 
C

Curt

This is the code I am using but it keeps giving me an error:

If c1 > 0 Then Row([7]).Visible Else Row([7]).Hidden

Where is my syntax wrong at???
 
C

Chip Pearson

Try

If Range("C1").Value > 0 Then
Rows(7).Hidden = False
Else
Rows(7).Hidden = True
End If



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


Curt said:
This is the code I am using but it keeps giving me an error:

If c1 > 0 Then Row([7]).Visible Else Row([7]).Hidden

Where is my syntax wrong at???
--
Thanks


Don Guillett said:
You can use a worksheet_change event macro. Right click sheet
tab>view code>
 
C

Curt

Thank you Chip, it works great


--
Thanks


Chip Pearson said:
Try

If Range("C1").Value > 0 Then
Rows(7).Hidden = False
Else
Rows(7).Hidden = True
End If



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


Curt said:
This is the code I am using but it keeps giving me an error:

If c1 > 0 Then Row([7]).Visible Else Row([7]).Hidden

Where is my syntax wrong at???
--
Thanks


Don Guillett said:
You can use a worksheet_change event macro. Right click sheet
tab>view code>

--
Don Guillett
SalesAid Software
(e-mail address removed)
Is there a way to hide a row till information is entered?

Example: If cell c1 > 0 then rows 7 through 10 will be
visible else they
will be hidden.
 

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