PC Review


Reply
Thread Tools Rate Thread

delete rows when value is within an interval in col 3

 
 
=?Utf-8?B?c3ZlcnJl?=
Guest
Posts: n/a
 
      26th Oct 2006
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 With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      26th Oct 2006
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
(E-Mail Removed)
"sverre" <(E-Mail Removed)> wrote in message
news:B591EF3B-6BE2-4B5F-8F53-(E-Mail Removed)...
> 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 With Quote
 
=?Utf-8?B?c3ZlcnJl?=
Guest
Posts: n/a
 
      26th Oct 2006
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
> (E-Mail Removed)
> "sverre" <(E-Mail Removed)> wrote in message
> news:B591EF3B-6BE2-4B5F-8F53-(E-Mail Removed)...
> > 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 With Quote
 
Don Guillett
Guest
Posts: n/a
 
      26th Oct 2006

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

--
Don Guillett
SalesAid Software
(E-Mail Removed)
"sverre" <(E-Mail Removed)> wrote in message
news:B57331DC-3690-45B0-84BC-(E-Mail Removed)...
> 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
>> (E-Mail Removed)
>> "sverre" <(E-Mail Removed)> wrote in message
>> news:B591EF3B-6BE2-4B5F-8F53-(E-Mail Removed)...
>> > 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 With Quote
 
=?Utf-8?B?c3ZlcnJl?=
Guest
Posts: n/a
 
      27th Oct 2006
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
> (E-Mail Removed)
> "sverre" <(E-Mail Removed)> wrote in message
> news:B57331DC-3690-45B0-84BC-(E-Mail Removed)...
> > 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
> >> (E-Mail Removed)
> >> "sverre" <(E-Mail Removed)> wrote in message
> >> news:B591EF3B-6BE2-4B5F-8F53-(E-Mail Removed)...
> >> > 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 With Quote
 
Don Guillett
Guest
Posts: n/a
 
      27th Oct 2006
Sure, just send to this address

--
Don Guillett
SalesAid Software
(E-Mail Removed)
"sverre" <(E-Mail Removed)> wrote in message
news:E4738BB4-55EE-4205-B4B0-(E-Mail Removed)...
> 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
>> (E-Mail Removed)
>> "sverre" <(E-Mail Removed)> wrote in message
>> news:B57331DC-3690-45B0-84BC-(E-Mail Removed)...
>> > 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
>> >> (E-Mail Removed)
>> >> "sverre" <(E-Mail Removed)> wrote in message
>> >> news:B591EF3B-6BE2-4B5F-8F53-(E-Mail Removed)...
>> >> > 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Autofil on variable rows, delete extract and show remaining rows 1plane Microsoft Excel Programming 3 17th Nov 2009 10:49 AM
Excel 2002: Any button to insert blank rows at specific interval? Mr. Low Microsoft Excel Misc 5 29th Mar 2009 02:51 PM
Copy two ranges without the interval rows to the email chelsea Microsoft Excel Programming 2 26th Jun 2008 11:40 AM
A macro that can delete the contents of a cell after a delayed interval mrlanier@hotmail.com Microsoft Excel Programming 8 20th Jan 2007 06:59 AM
Excel macro to insert blank rows at a ever-changing interval =?Utf-8?B?S25pZ2h0UmlkZXJBVw==?= Microsoft Excel Programming 1 12th Jan 2006 06:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:13 PM.