Re: $$Excel-Macros$$ Re: Want to hide entire row

2011-12-04 Thread Abdulgani Shaikh
Gr8, thanks a lot, its working, this saves my lot of time to hide each row one by one. Thanks once again. Regards On Sun, Dec 4, 2011 at 5:38 PM, Sam Mathai Chacko wrote: > 1. change > > Cells(Rows.Count, "b").End(xlUp).Row - 1 To *4* Step -1 > > 2. Change > > If Cells(i, "I") >= 0 And Cells(i, "

Re: $$Excel-Macros$$ Re: Want to hide entire row

2011-12-04 Thread Sam Mathai Chacko
1. change Cells(Rows.Count, "b").End(xlUp).Row - 1 To *4* Step -1 2. Change If Cells(i, "I") >= 0 And Cells(i, "L") >= 0 Then Rows(i).Hidden = True else Rows(i).Hidden = False End if Regards, Sam Mathai Chacko On Sun, Dec 4, 2011 at 3:27 PM, AbdulGani Shaikh wrote: > Thanks Sir, > I

Re: $$Excel-Macros$$ Re: Want to hide entire row

2011-12-04 Thread AbdulGani Shaikh
Thanks Sir, Its working, but it also hide its heading, is there any solution for not to hide Column heading. (First three rows are heading) This code hides all row having positive value in *both* column i.e. *"I"* & *"L"*. If value in any one column may be in *"I"* OR *"L"* is positive,* *then how

Re: $$Excel-Macros$$ Re: Want to hide entire row

2011-12-04 Thread AbdulGani Shaikh
Thanks Sir, Its working, but it also hide its heading, is there any solution for not to hide Column heading. (First three rows are heading) Regards On Fri, Dec 2, 2011 at 8:13 PM, dguillett1 wrote: > Option Explicit > Sub ShowNegativesInColumnsI_L_SAS() > Dim i As Long > Application.ScreenUpda

Re: $$Excel-Macros$$ Re: Want to hide entire row

2011-12-02 Thread Sam Mathai Chacko
The problem with hiding multiple rows is that each time a row is hidden, there is a calculation that happens in the backend, which slows down the overall processing time. So hiding 20-50 rows is OK, but when it comes to large number of rows, the macro gets slow. Check the module provided here whic

Re: $$Excel-Macros$$ Re: Want to hide entire row

2011-12-02 Thread dguillett1
Option Explicit Sub ShowNegativesInColumnsI_L_SAS() Dim i As Long Application.ScreenUpdating = False On Error Resume Next For i = Cells(Rows.Count, "b").End(xlUp).Row - 1 To 1 Step -1 If Cells(i, "I") >= 0 Or Cells(i, "L") >= 0 Then _ Rows(i).Hidden = True Next Application.ScreenUpdating = T

Re: $$Excel-Macros$$ Re: Want to hide entire row

2011-12-02 Thread ashish koul
do you want to hide rows with error value or not On Fri, Dec 2, 2011 at 4:40 PM, AbdulGani Shaikh wrote: > It gives error, screenshot of which is attached herewith > Regards > > On Fri, Dec 2, 2011 at 12:20 PM, ashish koul wrote: > >> Sub hide_data() >> Application.ScreenUpdating = False >> App

Re: $$Excel-Macros$$ Re: Want to hide entire row

2011-12-01 Thread ashish koul
Sub hide_data() Application.ScreenUpdating = False Application.DisplayAlerts = False Dim i As Long For i = Sheets(1).Range("a1").SpecialCells(xlLastCell).Row To 2 Step -1 If Sheets(1).Range("I" & i).Value >= 0 Or Sheets(1).Range("l" & i).Value >= 0 Then Sheets(1).Rows(i & ":" & i).Hidden = True En