View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default 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