LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Excel Delete VB Macro

Ty,

Something along the lines of

If ActiveCell.Interior.Color = RGB(255, 0, 0) Then
If Cells(ActiveCell.Row,10).Value = "" Then
ActiveCell.EntireRow.Clear
End If
End If

Column J is 10....

HTH,
Bernie
MS Excel MVP


"Ty" wrote in message
...
On Jul 31, 9:30 am, "Bernie Deitrick" <deitbe @ consumer dot org
wrote:
In response to the stepping from the bottom up to the top. Is that
why the "-1" is in the "ActiveCell.Offset(Offsetcount - 1, 0)". It is
not stepping from the bottom up but it is just doing what I call a 2
step(2 cells only). I see this while I'm doing the F8 and Watch.
p.s.-- I haven't had time to try the deletion as of yet. I really
appreciate the sharing of knowledge from an expert.


No. The -1 is so that the code compares two adjacent cells.

HTH,
Bernie
MS Excel MVP


Perfect. It works. 2 more questions.

What if I just wanted to delete rows that have the cell blank?

my answer: ActiveCell.Interior.Color = RGB(255, 0, 0) need to change
the RGB to the empty cell numbers(0, 0, 0)

What if I had another column such as column J as a condition to not
delete with my initials like TB?

my answer: If ActiveCell.Interior.Color = RGB(255, 0, 0) + column J is
blank. Don't really have answer but I'm trying to figure this out on
my own.

Thanks for your help....




 
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 do I delete a macro in Excel 2003? Button is greyed out. mg Excel Discussion (Misc queries) 3 August 17th 06 12:23 AM
How can I delete a macro when the Delete button is not active? FCR Excel Worksheet Functions 0 March 9th 06 09:43 AM
Need macro to delete all text cells in an Excel range GVT Excel Worksheet Functions 2 February 26th 06 12:25 PM
How do i delete a macro in Excel 2003 when delete isn't highlight Abel Excel Discussion (Misc queries) 2 September 13th 05 04:09 AM
Can't find macro in an Excel file to delete it Ron Excel Discussion (Misc queries) 3 July 1st 05 01:07 PM


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