Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Rows that have a Green font color to another worksheet
Hi I really need some help. I have a worksheet with columns A-P Rows 5 - 350 Some rows I have green font color the rest are black font color I have the letter "G" for green in the column P for the rows that are green. I need to code a command button that will look for the letter "G" and get these green rows and copy them to another worksheet titlled "Rolls to be Pulled" in the same workbook. I have tried everything I can think of Please help. Thanks Charles Alexander -- mrdata ------------------------------------------------------------------------ mrdata's Profile: http://www.excelforum.com/member.php...o&userid=17899 View this thread: http://www.excelforum.com/showthread...hreadid=511536 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Rows that have a Green font color to another worksheet
What is in column P for the rows that do not have green font's in them. Are
the "G"'s hard coded or produced by formulas. Assume Hardcoded and not green rows are blank Private Sub CommandButton1_Click() Dim rng as Range On Error Resume Next set rng = Me.Columns("P").Specialcells(xlConstants,xlTextVal ues) On Error goto 0 if not rng is nothing then rng.EntireRow.copy Destination:=Worksheets("Rolls to be Pulled").Cells(2,1) Else msgbox "No cells found" End if End Sub -- Regards, Tom Ogilvy "mrdata" wrote in message ... Hi I really need some help. I have a worksheet with columns A-P Rows 5 - 350 Some rows I have green font color the rest are black font color I have the letter "G" for green in the column P for the rows that are green. I need to code a command button that will look for the letter "G" and get these green rows and copy them to another worksheet titlled "Rolls to be Pulled" in the same workbook. I have tried everything I can think of Please help. Thanks Charles Alexander -- mrdata ------------------------------------------------------------------------ mrdata's Profile: http://www.excelforum.com/member.php...o&userid=17899 View this thread: http://www.excelforum.com/showthread...hreadid=511536 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Rows that have a Green font color to another worksheet
Hi Tom The "G" in column (P) refers to the row font color Green I'm using this to paint the row font colors without having to do it manualy The code you wrote copies all the rows to the correct worksheet I only want to copy the green rows Thanks for your help -- mrdata ------------------------------------------------------------------------ mrdata's Profile: http://www.excelforum.com/member.php...o&userid=17899 View this thread: http://www.excelforum.com/showthread...hreadid=511536 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Rows that have a Green font color to another worksheet
You didn't answer any of the questions I asked.
Based on what you did say, it looks like you have other than G's in column P. Sub CopyDate() Columns("P:P").Select Selection.AutoFilter Field:=1, Criteria1:="G" Selection.EnireRow.Copy _ Worksheets("Rolls to be Pulled").Cells(2,1) Worksheets("Rolls to be Pulled").Rows(2).Delete End Sub -- Regards, Tom Ogilvy "mrdata" wrote in message ... Hi Tom The "G" in column (P) refers to the row font color Green I'm using this to paint the row font colors without having to do it manualy The code you wrote copies all the rows to the correct worksheet I only want to copy the green rows Thanks for your help -- mrdata ------------------------------------------------------------------------ mrdata's Profile: http://www.excelforum.com/member.php...o&userid=17899 View this thread: http://www.excelforum.com/showthread...hreadid=511536 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Rows that have a Green font color to another worksheet
Tom: Sorry about the misunderstanding First the G's are not hard coded or entered by formula they are simply typed in the cells of column (P) the other Characters in column (P) are as follows R for red B for blue BR for brown P for pink or Magenta O for Orange A for loop I have coded loops through column (P) and changes the entire row the color of the Character in column (P) I need to pick out all the green rows and copy them to another worksheet that is already in the workbook "Rolls to be Pulled" Any help is appreciated Thanks Charles -- mrdata ------------------------------------------------------------------------ mrdata's Profile: http://www.excelforum.com/member.php...o&userid=17899 View this thread: http://www.excelforum.com/showthread...hreadid=511536 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Rows that have a Green font color to another worksheet
There has to be a way to do this I just can't seem to figure it out. -- mrdata ------------------------------------------------------------------------ mrdata's Profile: http://www.excelforum.com/member.php...o&userid=17899 View this thread: http://www.excelforum.com/showthread...hreadid=511536 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy cell and the font color | Excel Discussion (Misc queries) | |||
Retain font/cell color on lookup/copy | Excel Worksheet Functions | |||
Change font color in protected worksheet | Excel Worksheet Functions | |||
How to enable font color on protected worksheet? | Excel Discussion (Misc queries) | |||
How copy format, font, color and border without copy/paste? | Excel Programming |