Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default help writing a macro please!

I need help writing a macro.
I have a worksheet of columns A - D, with 100 rows.
I need to hide the row if the value in column C is 0.
I can get the macro started in row 1 of column C by recording
a macro and selecting that cell, but from there I don't know
what to do. Thanks soooooo much!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default help writing a macro please!

hi
Sub mcarter()
Dim r As Range
Dim rd As Range
Set r = Range("c1")
Do While Not IsEmpty(r)
Set rd = r.Offset(1, 0)
If r.Value = 0 Then
r.EntireRow.Hidden = True
End If
Set r = rd
Loop
MsgBox "done"
End Sub


"mcarter" wrote:

I need help writing a macro.
I have a worksheet of columns A - D, with 100 rows.
I need to hide the row if the value in column C is 0.
I can get the macro started in row 1 of column C by recording
a macro and selecting that cell, but from there I don't know
what to do. Thanks soooooo much!

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
writing macro EFFY Excel Programming 3 June 29th 05 05:30 PM
Macro Writing DFIChris Excel Programming 4 April 20th 05 04:51 PM
Need Help writing a macro TwEaKFrEaK[_4_] Excel Programming 1 August 24th 04 10:16 PM
Macro Writing Help? Richard[_22_] Excel Programming 2 December 31st 03 07:39 PM
Writing Macro Tammy Klein Excel Programming 1 October 3rd 03 09:13 PM


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

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"