Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 13
Unhappy Macro - Delete Rows with specific text

Hi,

I want have the following types of table

Total Inflow 82,437 25,921 26,294 27,272 28,455


Cheryl 0 0 0 0 0
Pension 0 0 0 0 0
Total Outflow 81,475 25,625 26,275 26,925 27,600

I want to delete the rows which includes all zeros - can someone please tell me the coding of doing this. Note- in the above table row starting with "cheryl" and "pension" should be deleted.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 587
Default Macro - Delete Rows with specific text

hi,

Sub Macro1()
For i = Range("A65536").End(xlUp).Row To 2 Step -1
If Range("A" & i) < "" And Application.Sum(Range("B" & i & ":IV" & i)) = 0 Then Rows(i).Delete Shift:=xlUp
Next
End Sub



--
isabelle



Le 2012-03-28 19:50, Umesh Banga a écrit :
Hi,

I want have the following types of table

Total Inflow 82,437 25,921 26,294 27,272 28,455


Cheryl 0 0 0 0 0
Pension 0 0 0 0 0
Total Outflow 81,475 25,625 26,275 26,925 27,600

I want to delete the rows which includes all zeros - can someone please
tell me the coding of doing this. Note- in the above table row starting
with "cheryl" and "pension" should be deleted.




  #3   Report Post  
Junior Member
 
Posts: 13
Smile

Thanks Isabelle, you are champion. It works perfectly well.

I was wondering if you have something like this for MS WORD.


Quote:
Originally Posted by isabelle View Post
hi,

Sub Macro1()
For i = Range("A65536").End(xlUp).Row To 2 Step -1
If Range("A" & i) < "" And Application.Sum(Range("B" & i & ":IV" & i)) = 0 Then Rows(i).Delete Shift:=xlUp
Next
End Sub



--
isabelle



Le 2012-03-28 19:50, Umesh Banga a écrit :
Hi,

I want have the following types of table

Total Inflow 82,437 25,921 26,294 27,272 28,455


Cheryl 0 0 0 0 0
Pension 0 0 0 0 0
Total Outflow 81,475 25,625 26,275 26,925 27,600

I want to delete the rows which includes all zeros - can someone please
tell me the coding of doing this. Note- in the above table row starting
with "cheryl" and "pension" should be deleted.



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
Delete rows with specific text David New Users to Excel 5 April 3rd 23 07:29 PM
Delete Rows Without Specific Text waggett Excel Worksheet Functions 6 October 6th 09 11:34 AM
Delete Rows With Specific Text or Values Sean[_15_] Excel Programming 1 August 30th 06 10:23 PM
Delete Rows With Specific Text Sean Excel Programming 1 August 19th 06 03:47 PM
Delete rows with specific text MAYDAY[_3_] Excel Programming 8 June 7th 05 08:38 PM


All times are GMT +1. The time now is 10:38 AM.

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"