Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copy Rows that have a Green font color to another worksheet


Tom Ogilvy


This code you wrote almost works the way I want it to

But I only want to copy the rows that the text is green
Can you help me modify the code I have tried to but I don't have th
know how to make it work.

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 b
Pulled").Cells(2,1)
Else
msgbox "No cells found"
End if

Thanks
Charle

--
mrdat
-----------------------------------------------------------------------
mrdata's Profile: http://www.excelforum.com/member.php...fo&userid=1789
View this thread: http://www.excelforum.com/showthread.php?threadid=51153

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
Copy cell and the font color Falcon248 Excel Discussion (Misc queries) 4 January 22nd 10 07:36 PM
Retain font/cell color on lookup/copy JPS Excel Worksheet Functions 3 July 23rd 08 06:30 AM
Change font color in protected worksheet Dyanna Excel Worksheet Functions 2 November 21st 07 01:43 PM
How to enable font color on protected worksheet? dlterry Excel Discussion (Misc queries) 3 January 28th 05 11:19 PM
How copy format, font, color and border without copy/paste? Michel[_3_] Excel Programming 1 November 5th 03 04:43 PM


All times are GMT +1. The time now is 12:40 AM.

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"