LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 156
Default Tricky Macro Question

Yes Rick you are correct. The colors auto populate in column A based on data
in the columns B-F.

Thank you for your help. I will try this macro.

"Rick Rothstein" wrote:

It is always helpful to give specifics about your layout for those items you
are referencing (otherwise we have to guess). I am assuming that your color
qualifiers are the words Red, Green and Yellow (and not actual cell colors)
and that they are located in Column A. I am also assuming your data starts
in Row 2 after the assumed header text in Row 1. Here is the macro...

Sub SplitColorRowsToNewSheets()
Dim X As Long, LastRow As Long
Dim SheetNames As Variant, CurrentSheet As Worksheet
Set CurrentSheet = Worksheets("Sheet1")
SheetNames = Array("Red", "Green", "Yellow")
For X = LBound(SheetNames) To UBound(SheetNames)
Sheets.Add After:=Sheets(Sheets.Count)
Sheets(Sheets.Count).Name = SheetNames(X) & " (" & Date$ & ")"
Next
LastRow = CurrentSheet.Cells(Rows.Count, "A").End(xlUp).Row
For X = 2 To LastRow
With Sheets(CurrentSheet.Cells(X, "A") & " (" & Date$ & ")")
CurrentSheet.Rows(X).Copy .Cells(.Cells(Rows.Count, _
"A").End(xlUp).Row + 1, "A").EntireRow
End With
Next
End Sub

--
Rick (MVP - Excel)


"Philip" wrote in message
...
I created a worksheet that consists of multiple fields of data (the columns
are ie. date, point of contact, completion date, etc) and based on the
inputs
into those columns I have a formula that calculates whether or not a
particular row of data should be classified as "Red" "Green" or "yellow".

I would like to be able to create a macro which in turn takes all rows
that
have a "Red" qualifier and input that data onto a new worksheet. Also, I
would like that macro to take all rows that have a "Green" qualifier and
input that data onto another new worksheet.

I would appreciate any guidance that you may have in helping me complete
this task.

Thank you!


.



 
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
Tricky Ranking Question SteveC Excel Discussion (Misc queries) 1 August 24th 07 03:11 AM
Tricky counting question Jay Weiss Excel Discussion (Misc queries) 2 May 1st 06 04:53 PM
Tricky comparing question Corben Excel Worksheet Functions 3 April 21st 06 10:11 PM
Tricky Question The Boondock Saint Excel Worksheet Functions 7 December 8th 04 07:22 PM
rota question - very tricky... Michelle Tucker Excel Discussion (Misc queries) 0 November 27th 04 11:55 AM


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