Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Delete based on results of formula

In the code below, I am able to delete rows that have a
value of less than one. What I really want to do is to
delete rows where (A1 + B1)<1, (A2 + B2)<1, and so on.

How do I write a simple formula like the above that is
similar to the below? Thanks in advance.



Range("a1").Select
While ActiveCell < ""
If ActiveCell < 1 Then
ActiveCell.EntireRow.Delete
ActiveCell.Offset(-1, 0).Select
End If
ActiveCell.Offset(1, 0).Select
Wend
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Delete based on results of formula

Range("a1").Select
While ActiveCell < ""
If ActiveCell + ActiveCell.Offset(0,1) < 1 Then
ActiveCell.EntireRow.Delete
ActiveCell.Offset(-1, 0).Select
End If
ActiveCell.Offset(1, 0).Select
Wend

--
Regards,
Tom Ogilvy

"Steve R" wrote in message
...
In the code below, I am able to delete rows that have a
value of less than one. What I really want to do is to
delete rows where (A1 + B1)<1, (A2 + B2)<1, and so on.

How do I write a simple formula like the above that is
similar to the below? Thanks in advance.



Range("a1").Select
While ActiveCell < ""
If ActiveCell < 1 Then
ActiveCell.EntireRow.Delete
ActiveCell.Offset(-1, 0).Select
End If
ActiveCell.Offset(1, 0).Select
Wend



  #3   Report Post  
Posted to microsoft.public.excel.programming
sr sr is offline
external usenet poster
 
Posts: 2
Default Delete based on results of formula

Perfect. Thank you.
-----Original Message-----
Range("a1").Select
While ActiveCell < ""
If ActiveCell + ActiveCell.Offset(0,1) < 1 Then
ActiveCell.EntireRow.Delete
ActiveCell.Offset(-1, 0).Select
End If
ActiveCell.Offset(1, 0).Select
Wend

--
Regards,
Tom Ogilvy

"Steve R" wrote in

message
...
In the code below, I am able to delete rows that have a
value of less than one. What I really want to do is to
delete rows where (A1 + B1)<1, (A2 + B2)<1, and so on.

How do I write a simple formula like the above that is
similar to the below? Thanks in advance.



Range("a1").Select
While ActiveCell < ""
If ActiveCell < 1 Then
ActiveCell.EntireRow.Delete
ActiveCell.Offset(-1, 0).Select
End If
ActiveCell.Offset(1, 0).Select
Wend



.

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
hyperlink to cell based on formula results nba Excel Discussion (Misc queries) 5 November 8th 09 05:21 AM
Countif if counted results are based on formula tmax Excel Worksheet Functions 6 March 27th 09 09:26 AM
Delete Formula Based on Multiple Columns Cue Excel Discussion (Misc queries) 2 June 23rd 08 03:41 AM
Assigning a Value based on Results JerryS Excel Worksheet Functions 2 June 15th 07 04:47 PM
How do I delete the formula but keep the results Paul K. Excel Worksheet Functions 2 October 1st 05 01:37 PM


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