Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to Delete row with criteria ?


Hi everyone.

I have a col that contains many other value such as:
A1 contain 0
A2 - 544
A3 -0
A4 - 100
A5 -0
A6 -53
A7 -0
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default How to Delete row with criteria ?


vumian wrote:
Hi everyone.

I have a col that contains many other value such as:
A1 contain 0
A2 - 544
A3 -0
A4 - 100
A5 -0
A6 -53
A7 -0


I think your post is incomplete. What are you trying to do with your
data?

AR

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to Delete row with criteria ?


I wanna delete the rows that contain zero value .
thanks for ur help


--
vumian
------------------------------------------------------------------------
vumian's Profile: http://www.excelforum.com/member.php...o&userid=36494
View this thread: http://www.excelforum.com/showthread...hreadid=562920

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to Delete row with criteria ?


I wanna delete the rows that contain zero value .
thanks for ur help


--
vumian
------------------------------------------------------------------------
vumian's Profile: http://www.excelforum.com/member.php...o&userid=36494
View this thread: http://www.excelforum.com/showthread...hreadid=562920

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default How to Delete row with criteria ?

How about applying data|filter|autofilter to column A.

Then show only the 0's.
delete those visible rows
remove the data|filter|autofilter


vumian wrote:

I wanna delete the rows that contain zero value .
thanks for ur help

--
vumian
------------------------------------------------------------------------
vumian's Profile: http://www.excelforum.com/member.php...o&userid=36494
View this thread: http://www.excelforum.com/showthread...hreadid=562920


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default How to Delete row with criteria ?

Assume column A

Sub AAA()
Dim rng As Range
Columns(1).Replace What:="0", _
Replacement:="=na()", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
On Error Resume Next
Set rng = Columns(1).SpecialCells(xlFormulas, xlErrors)
On Error GoTo 0
If Not rng Is Nothing Then
rng.EntireRow.Delete
End If
End Sub

--
Regards,
Tom Ogilvy


"vumian" wrote:


I wanna delete the rows that contain zero value .
thanks for ur help


--
vumian
------------------------------------------------------------------------
vumian's Profile: http://www.excelforum.com/member.php...o&userid=36494
View this thread: http://www.excelforum.com/showthread...hreadid=562920


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to Delete row with criteria ?


to: Tom Ogilvy

Your function error coz you replace zero inside cell
Ex: 500 -- 5()na()na

to: Gord Dibben

your function's great. ths muc

--
vumia
-----------------------------------------------------------------------
vumian's Profile: http://www.excelforum.com/member.php...fo&userid=3649
View this thread: http://www.excelforum.com/showthread.php?threadid=56292

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default How to Delete row with criteria ?

Change
LookAt:=xlPart,
to
LookAt:=xlWhole,



vumian wrote:

to: Tom Ogilvy

Your function error coz you replace zero inside cell
Ex: 500 -- 5()na()na

to: Gord Dibben

your function's great. ths much

--
vumian
------------------------------------------------------------------------
vumian's Profile: http://www.excelforum.com/member.php...o&userid=36494
View this thread: http://www.excelforum.com/showthread...hreadid=562920


--

Dave Peterson
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default How to Delete row with criteria ?

Not so great........deletes rows that contain 500 or 702

Changes to avoid that.

Sub DeleteRows_With_Zero()
findstring = "0"
Set B = Range("A:A").Find(What:=findstring, LookAt:=xlWhole)
While Not (B Is Nothing)
B.EntireRow.Delete
Set B = Range("A:A").Find(What:=findstring, LookAt:=xlWhole)
Wend
End Sub


Gord

On Wed, 19 Jul 2006 13:26:38 -0400, vumian
wrote:


to: Tom Ogilvy

Your function error coz you replace zero inside cell
Ex: 500 -- 5()na()na

to: Gord Dibben

your function's great. ths much


  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to Delete row with criteria ?


I wanna delete the rows that contain zero value .
thanks for ur help


--
vumian
------------------------------------------------------------------------
vumian's Profile: http://www.excelforum.com/member.php...o&userid=36494
View this thread: http://www.excelforum.com/showthread...hreadid=562920



  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default How to Delete row with criteria ?

Sub DeleteRows_With_Zero()
findstring = "0"
Set B = Range("A:A").Find(What:=findstring, LookAt:=xlPart)
While Not (B Is Nothing)
B.EntireRow.Delete
Set B = Range("A:A").Find(What:=findstring, LookAt:=xlPart)
Wend
End Sub


Gord Dibben MS Excel MVP

On Wed, 19 Jul 2006 12:27:58 -0400, vumian
wrote:


I wanna delete the rows that contain zero value .
thanks for ur help


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
How to Delete row with criteria ? vumian[_2_] Excel Programming 1 July 26th 06 04:28 AM
How to Delete row with criteria ? vumian[_3_] Excel Programming 0 July 19th 06 04:54 PM
Delete rows with different criteria John Excel Programming 7 July 13th 05 05:38 PM
Further help on delete criteria found rjamison Excel Programming 0 June 14th 05 12:14 AM
delete rows with criteria S.E. Excel Programming 5 September 9th 04 04:04 PM


All times are GMT +1. The time now is 05:17 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"