Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Pain in the ass macro Part 2


I am creating a macro that contains a for loop that runs through colum
E and checks the value of each cell. If the cell equals 0 then it hide
the entire row and moves down to the next cell, and if it has a value i
does nothing and moves on. As I am writing the code I am getting erro
after error. Any help with this matter would be greatly appreciated
Thank yo

--
Jesse
-----------------------------------------------------------------------
JesseK's Profile: http://www.excelforum.com/member.php...fo&userid=2496
View this thread: http://www.excelforum.com/showthread.php?threadid=38526

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Pain in the ass macro Part 2


iLastRow = Cells(Rows.Count,"E").End(xlUp).Row
For i = 1 To iLastRow
If Cells(i,"E").Value = 0 Then
Rows(i)Hidden = true
End If
Next i

--
HTH

Bob Phillips

"JesseK" wrote in
message ...

I am creating a macro that contains a for loop that runs through column
E and checks the value of each cell. If the cell equals 0 then it hides
the entire row and moves down to the next cell, and if it has a value it
does nothing and moves on. As I am writing the code I am getting error
after error. Any help with this matter would be greatly appreciated.
Thank you


--
JesseK
------------------------------------------------------------------------
JesseK's Profile:

http://www.excelforum.com/member.php...o&userid=24964
View this thread: http://www.excelforum.com/showthread...hreadid=385263



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default Pain in the ass macro Part 2

Bob,

In order to help Jesse remain calm, I'll point out that in the 4th line you
meant:

Rows(i).Hidden = true

Doug

"Bob Phillips" wrote in message
...

iLastRow = Cells(Rows.Count,"E").End(xlUp).Row
For i = 1 To iLastRow
If Cells(i,"E").Value = 0 Then
Rows(i)Hidden = true
End If
Next i

--
HTH

Bob Phillips

"JesseK" wrote in
message ...

I am creating a macro that contains a for loop that runs through column
E and checks the value of each cell. If the cell equals 0 then it hides
the entire row and moves down to the next cell, and if it has a value it
does nothing and moves on. As I am writing the code I am getting error
after error. Any help with this matter would be greatly appreciated.
Thank you


--
JesseK
------------------------------------------------------------------------
JesseK's Profile:

http://www.excelforum.com/member.php...o&userid=24964
View this thread:

http://www.excelforum.com/showthread...hreadid=385263





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
Task Pain tc Excel Discussion (Misc queries) 4 August 29th 07 04:44 PM
Comments on frozen pain Flints Excel Discussion (Misc queries) 2 August 8th 06 04:41 PM
Oh God the Pain! Help Please! jshpik1 Excel Discussion (Misc queries) 2 May 9th 06 08:25 AM
Pain in the ass macro JesseK Excel Programming 5 July 6th 05 05:50 PM
pain cell max and min [email protected] Excel Programming 2 March 31st 05 10:26 AM


All times are GMT +1. The time now is 02:41 AM.

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

About Us

"It's about Microsoft Excel"