There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
black screen blue screen blue screen of death boot computer connection crash css dell display driver drivers error excel firefox firefox 3 game hard drive internet internet explorer itunes laptop lcd linux malware monitor network networking nvidia outlook outlook 2003 outlook express partition password printer problem ram router slow software sound sprtcmd.exe trojan usb video virus vista windows windows xp wireless
Business Applications
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Business Applications >
copy rows into another sheet based on colour


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
wirdip's Avatar
Junior Member with 4 posts.
 
Join Date: Jun 2008
Experience: Intermediate
11-Jun-2008, 02:35 PM #1
copy rows into another sheet based on colour
Hi,
I have a list of 150 stores of which 20 are designated "gold" which means they get better service for deliveries. In the spreadsheet that contains these stores they are already configured to have the name of the store blocked in yellow (gold). I have to manually retype these onto another sheet, is there a way of transferring this info using the colour as the argument.

Many thanks.
JesseFerguson's Avatar
Junior Member with 5 posts.
 
Join Date: Jun 2008
Experience: Intermediate
11-Jun-2008, 02:44 PM #2
Are you coloring the field manually? If you aren't doing so already, you may want to set up a drop-down list with the "membership level" in it, then run a conditional format on that field to color the store cell automatically. If you've done that, you could just turn on autofilter, and only show the gold members. If you still need them on a separate sheet, you can set up a macro to filter, then copy and paste.

Hope this helps! Let me know if you need any help with details.
bomb #21's Avatar
Distinguished Member with 5,988 posts.
 
Join Date: Jul 2005
Location: The void AKA edge of the Fens
Experience: I bent my wookie :(
12-Jun-2008, 03:34 AM #3
You don't state which version you're using ... although I'm not sure even 2007 has "the power" to filter by colour.

If you have:

- a "Sheet1" and a "Sheet2"

- the data in rows 1 to 150

- manual colouring in column A

- "records" with a width of 2 columns

, then a small macro such as below will copy the required ones from S1 to S2. So you could adjust it to fit your set-up.

If the colouring results from conditional formatting, you'd need to have the code test for the same condition(s) that creates the yellow (6) colour.

HTH

(Note: if you need help installing macros, post back)

Sub test()
For Each Cell In Sheets("Sheet1").Range("A1:A150")
If Cell.Interior.ColorIndex = 6 Then
Cell.Resize(, 2).Copy Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1)
End If
Next Cell
End Sub
__________________
"Love All The People."
Bill Hicks, 1961 - 1994 -- R.I.P.

"I am against religion because it teaches us to be satisfied with not understanding the world."
Richard Dawkins

"OK, one last time. These are small... but the ones out there are far away. Small ... far away ..."
Father Ted
JesseFerguson's Avatar
Junior Member with 5 posts.
 
Join Date: Jun 2008
Experience: Intermediate
12-Jun-2008, 11:43 AM #4
Missed the point...
Rather than adding the conditional formatting to the second page, since you know you're only going to be pasting the Gold members, I'd have the second sheet pre-formatted, and just paste the values straight in.

And for the record, Excel 2007 does allow you to filter by color. But I'm not talking about that. I'm suggesting filtering based on the conditional field, ie:

Store|Location|Membership Level
004|Portland|Gold
005|Beaverton|Silver
003|Vancouver|Silver
010|Milwaukie|Gold

Set up your conditional formatting to key off column C (Membership Level), to color in any row where that cell has a value of "Gold." Then you just filter on the C column to only include "Gold" members
bomb #21's Avatar
Distinguished Member with 5,988 posts.
 
Join Date: Jul 2005
Location: The void AKA edge of the Fens
Experience: I bent my wookie :(
14-Jun-2008, 04:00 AM #5
Not sure if you're saying I missed the point or you did.



I understand "I'm not talking about that. I'm suggesting filtering based on the conditional field". But if a membership level field was to be added, it would be more efficient (IMO) to populate it with a formula (if performance = OK, "Gold", else "silver") rather than use 2-option data validation that would need continual manual updating.

HTH
__________________
"Love All The People."
Bill Hicks, 1961 - 1994 -- R.I.P.

"I am against religion because it teaches us to be satisfied with not understanding the world."
Richard Dawkins

"OK, one last time. These are small... but the ones out there are far away. Small ... far away ..."
Father Ted
JesseFerguson's Avatar
Junior Member with 5 posts.
 
Join Date: Jun 2008
Experience: Intermediate
16-Jun-2008, 11:17 AM #6
I'm not sure I'm following you. From reading his original post, it doesn't sound like the service level is listed anywhere on the sheet, but that they use the gold coloring as a quick reference to indicate who gets said service.

Here's an example of what I'm talking about. You could add whatever other columns you need, this gets the point.
Attached Files
File Type: xls example.xls (15.0 KB, 27 views)
wirdip's Avatar
Junior Member with 4 posts.
 
Join Date: Jun 2008
Experience: Intermediate
17-Jul-2008, 05:52 PM #7
Thanks to everyone who helped with copying to another sheet based on colour of cells, in the end I used bomb21's macro worked a snip.

Can anyone tell me how to countif based on the colour red, I have a column of arrival times and if they are over 1 hour late they turn red, I need to keep a count of these.

Thanks in anticipation,

Alan
Aj_old's Avatar
Computer Specs
Senior Member with 624 posts.
 
Join Date: Sep 2007
Location: Moldova
Experience: Intermediate
18-Jul-2008, 01:44 AM #8
Quote:
Originally Posted by wirdip View Post
Thanks to everyone who helped with copying to another sheet based on colour of cells, in the end I used bomb21's macro worked a snip.

Can anyone tell me how to countif based on the colour red, I have a column of arrival times and if they are over 1 hour late they turn red, I need to keep a count of these.

Thanks in anticipation,

Alan
You can use countif function on the range that contains the time, and use the same condition as for coloring it in red!
jimr381's Avatar
Distinguished Member with 3,622 posts.
 
Join Date: Jul 2007
Location: 1313 Mockingbird Lane
Experience: 1 Child, so not much
18-Jul-2008, 01:48 PM #9
For clarification purposes Excel 2007 does indeed allow you to sort by color making it easier to find a certain color. I do not have it on my PC actively so I cannot tell you if you can filter by color though. Can someone clarify this for Bomb and myself please?

Quote:
Originally Posted by bomb #21 View Post
You don't state which version you're using ... although I'm not sure even 2007 has "the power" to filter by colour.

If you have:

- a "Sheet1" and a "Sheet2"

- the data in rows 1 to 150

- manual colouring in column A

- "records" with a width of 2 columns

, then a small macro such as below will copy the required ones from S1 to S2. So you could adjust it to fit your set-up.

If the colouring results from conditional formatting, you'd need to have the code test for the same condition(s) that creates the yellow (6) colour.

HTH

(Note: if you need help installing macros, post back)

Sub test()
For Each Cell In Sheets("Sheet1").Range("A1:A150")
If Cell.Interior.ColorIndex = 6 Then
Cell.Resize(, 2).Copy Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1)
End If
Next Cell
End Sub
__________________
"Take what you learn and make a difference with it."
___________________________________________

"Oh, goody!"
___________________________________________
The magic number is: 28192 for Zukirin Shikimirika****eari
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 04:40 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.