Re: $$Excel-Macros$$ Vba Code Required for Delete Entire Row

2011-07-28 Thread arpit rajput
Thaks Daniel,

your logic is super.


On Thu, Jul 28, 2011 at 4:09 PM, Daniel  wrote:

>  Hi,
>
> ** **
>
> Another way to do it :
>
> ** **
>
> Sub test()
>
> Dim rgRange As Range
>
> With Sheets("Report")
>
> Set rgRange = Range(.[A1], .Cells(.Rows.Count, 1).End(xlUp).Offset(,
> 9))
>
> rgRange.AutoFilter 10, 0
>
> Set rgRange = rgRange.Offset(1).Resize(rgRange.Rows.Count - 1)
>
> Set rgRange = rgRange.SpecialCells(xlCellTypeVisible)
>
> rgRange.EntireRow.Delete
>
> .AutoFilter.Range.AutoFilter
>
> End With
>
> End Sub
>
> ** **
>
> Regards.
>
> Daniel****
>
> ** **
>
> *De :* excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
> *De la part de* arpit rajput
> *Envoyé :* jeudi 28 juillet 2011 11:20
> *À :* excel-macros@googlegroups.com
> *Objet :* $$Excel-Macros$$ Vba Code Required for Delete Entire Row
>
> ** **
>
> Hi Experts,
>
>  
>
>  I want to remove entire row when each cell value =0 in column J see in
> attached file.
>
> Anybody suggest me VBA code to delete all 0 value rows.
>
>  
>
> Thanks
>
> ARPIT KUMAR
>
> --
>
> --
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links :
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
> To post to this group, send email to excel-macros@googlegroups.com
>
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel
>
> --
>
> --
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links :
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
> To post to this group, send email to excel-macros@googlegroups.com
>
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel
>

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


Re: $$Excel-Macros$$ Vba Code Required for Delete Entire Row

2011-07-28 Thread arpit rajput
Thanks Noorain for your quick respond.

It will not delete all rows properly at one time,  about 50% 0 values row
penidng at the time of appling logic first time. i  made some change but its
going hang. can you please modify it.

Sub delete_row()
dim i,j as long
application.screenupdating=false
j=application.worksheetfunction.counta(sheet22.range("J:J"))
for i=1 to j
if sheet22.cells(i,10).value=0 then
sheet22.range("J"&i).EntireRow.Delete
i= i-1
else
i= i+1
end if
next i
application.screenupdating=true
End Sub



On Thu, Jul 28, 2011 at 4:01 PM, NOORAIN ANSARI wrote:

> Dear Arpit,
>
> Please try below code to delete row equal to 0 in J Column..
>
> Sub delete_row()
> dim i,j as long
> application.screenupdating=false
> j=application.worksheetfunction.counta(sheet22.range("J:J"))
> for i=1 to j
> if sheet22.cells(i,10).value=0 then
> sheet22.range("J"&i).EntireRow.Delete
> end if
> next i
> application.screenupdating=true
> End Sub
>
>
> --
> Thanks & regards,
> Noorain Ansari
> *http://noorain-ansari.blogspot.com/*<http://noorain-ansari.blogspot.com/>
>
>
>   On Thu, Jul 28, 2011 at 2:50 PM, arpit rajput wrote:
>
>> Hi Experts,
>>
>>
>>
>>  I want to remove entire row when each cell value =0 in column J see in
>> attached file.
>>
>> Anybody suggest me VBA code to delete all 0 value rows.
>>
>>
>>
>> Thanks
>>
>> ARPIT KUMAR
>>
>> --
>>
>> --
>> Some important links for excel users:
>> 1. Follow us on TWITTER for tips tricks and links :
>> http://twitter.com/exceldailytip
>> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
>> 3. Excel tutorials at http://www.excel-macros.blogspot.com
>> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
>> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>>
>> To post to this group, send email to excel-macros@googlegroups.com
>>
>> <><><><><><><><><><><><><><><><><><><><><><>
>> Like our page on facebook , Just follow below link
>> http://www.facebook.com/discussexcel
>>
>
>
>
> --
>
> --
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links :
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
> To post to this group, send email to excel-macros@googlegroups.com
>
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel
>

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel