Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default Code problem

I would like to delete rows in column c for a criteria with a macro code. But
I have a problem with my code, it doesn't work. Could anyone tell me what's
wrong with my macro code? Thanks!

Sub filter()
Dim i As integer
i=0
Do until i=""
'my criteria is that all rows that contain a value between 800 and 900 have
to be deleted
If Cells (i,3).Value=800 AND Cells(i,3)<=900 Then EntireRow.delete
i=i+1
Loop

End sub

 
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
Problem with code kk Excel Discussion (Misc queries) 0 March 15th 08 03:01 PM
CODE PROBLEM N.F[_2_] Excel Discussion (Misc queries) 2 June 15th 07 08:07 PM
VB Code Problem Stan Excel Discussion (Misc queries) 6 April 25th 07 01:48 AM
XLS to CSV Code Problem carl Excel Worksheet Functions 0 March 28th 07 01:21 AM
Little problem with this code... simonsmith Excel Discussion (Misc queries) 11 May 21st 06 04:02 AM


All times are GMT +1. The time now is 03:04 PM.

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"