Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 28
Default filter the rows which is having the colored text

I have a set of 310,000 rows which I recieved from somebody and I want to
delete the rows which is having colored text



Can I filter the rows which is having colored text and then delete it
completely??

pls suggest some steps

regards
MAnoj
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default filter the rows which is having the colored text

Right click the sheet tab, view code and paste this in. It looks for red text
on column A and deletes the entire row if it finds it

Sub delete_Me()
Dim copyrange As Range
lastrow = Cells(Cells.Rows.Count, "A").End(xlUp).Row
Set myrange = Range("A1:A" & lastrow)
For Each c In myrange
If c.Font.ColorIndex = 3 Then 'Red change to suit
If copyrange Is Nothing Then
Set copyrange = c.EntireRow
Else
Set copyrange = Union(copyrange, c.EntireRow)
End If
End If
Next
copyrange.Delete
End Sub


Mike

"manoj" wrote:

I have a set of 310,000 rows which I recieved from somebody and I want to
delete the rows which is having colored text



Can I filter the rows which is having colored text and then delete it
completely??

pls suggest some steps

regards
MAnoj

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
remove colored rows climate Excel Worksheet Functions 6 November 8th 07 04:17 PM
how to filter through a colored cell which has no value??? Hus Excel Discussion (Misc queries) 3 August 5th 07 01:26 AM
filter by colored cell? tina Excel Worksheet Functions 3 February 12th 07 10:34 PM
sort according to the colored rows swchee Excel Discussion (Misc queries) 2 August 18th 05 04:07 AM
Auto Filter out text or blank rows D Hafer - TFE Excel Discussion (Misc queries) 8 July 1st 05 01:02 PM


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

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"