Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default delete rows when value is within an interval in col 3

Hi

I would like to delete rows in col 3 IF the value in col 3 is in the
interval below:

9999999


<11000000

How do I write that syntax?

Best regards
Sverre

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default delete rows when value is within an interval in col 3

lr=cells(rows.count,"c").end(xlup).row
for i=2 to lr
if cells(i,"c")999 and cells(i,"c")<1100 then rows(i).delete
next

--
Don Guillett
SalesAid Software

"sverre" wrote in message
...
Hi

I would like to delete rows in col 3 IF the value in col 3 is in the
interval below:

9999999


<11000000

How do I write that syntax?

Best regards
Sverre



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default delete rows when value is within an interval in col 3

Hi Don

It works only for one line at a time - it does not check all lines. It stops
and you need to repeat the macro.

Any ideas?

Br

"Don Guillett" skrev:

lr=cells(rows.count,"c").end(xlup).row
for i=2 to lr
if cells(i,"c")999 and cells(i,"c")<1100 then rows(i).delete
next

--
Don Guillett
SalesAid Software

"sverre" wrote in message
...
Hi

I would like to delete rows in col 3 IF the value in col 3 is in the
interval below:

9999999


<11000000

How do I write that syntax?

Best regards
Sverre




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default delete rows when value is within an interval in col 3

Hi Don

Can I send you a mail with the doc as attach. and you can see what happens?

I think something is wrong with the row count.

Sverre

"Don Guillett" skrev:


I just tested and it worked just fine. What did you do (step by step)

--
Don Guillett
SalesAid Software

"sverre" wrote in message
...
Hi Don

It works only for one line at a time - it does not check all lines. It
stops
and you need to repeat the macro.

Any ideas?

Br

"Don Guillett" skrev:

lr=cells(rows.count,"c").end(xlup).row
for i=2 to lr
if cells(i,"c")999 and cells(i,"c")<1100 then rows(i).delete
next

--
Don Guillett
SalesAid Software

"sverre" wrote in message
...
Hi

I would like to delete rows in col 3 IF the value in col 3 is in the
interval below:

9999999

<11000000

How do I write that syntax?

Best regards
Sverre









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
Excel 2002: Any button to insert blank rows at specific interval? Mr. Low Excel Discussion (Misc queries) 5 March 29th 09 02:51 PM
Cut filtered rows, paste into next empty row of new sheet, and delete cut rows Scott Excel Worksheet Functions 0 December 13th 06 01:25 AM
Excel macro to insert blank rows at a ever-changing interval KnightRiderAW Excel Programming 1 January 12th 06 06:51 PM
How to delete rows when List toolbar's "delete" isnt highlighted? Linda Excel Worksheet Functions 1 May 26th 05 08:39 PM
Delete every 3rd row, then delete rows 2-7, move info f/every 2nd row up one to the end and delete the row below Annette[_4_] Excel Programming 2 September 21st 04 02:40 PM


All times are GMT +1. The time now is 06:37 AM.

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"