Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default i really need help w/ this please...


first off, allow me to apologize for this lenghy post but i've bee
stuck on this for very long already...

i've searched through hundreds of threads but haven't found exactl
what i needed. i even tried to "combine" codes i've found to make wha
i need but eventually nothing made sense...
well, this may be rather long, but is really important to my project a
work:

i have a file - eca.xls...
it contains 9 sheets...
7 of those are months - april through october containing data...
the 8th sheet, called "non-dup", is a combined sheet of the months...
the 9th, called "master", is a copy of the 8th but w/ additiona
columns that that the other sheets dont' have...
8 of the 9 sheets are formated the same way and row 1 contains the sam
headings (one of them being "Event")...
sheet 9 has a different formatting style and has the "Event" column to
along w/ additional columns the other sheets don't have...

so what i need is a macro that will compare the april through octobe
sheets to the "non-dup" and "master" sheet and change the color of th
fonts in the "Event" column to correspond w/ each other.

in other words, all the "events" in april-oct. already are in non-du
and master but i'd like to make them red; do the same for may and mak
those green and so on...

so, for example, if may contains the "event" E12345678 (which is ho
the "events" look), "non-dup" and "master" will contain it as well, bu
i want the macro to locate this "event" in "non-dup" and "master" an
make it whatever color it is the month sheet.

i have the "event" columns in the months already changed to differen
colors for each month, i just need to locate and change those colors i
the other 2 sheets..

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default i really need help w/ this please...


Dim fCell As Range
Dim tCell As Range

Dim Ws As Worksheet
Dim mEvent As String
Dim mColour As Integer


For Each Ws In Worksheets
Select Case Ws.Name
Case "May", "June" ' etc - do not include Master & non-dup
For Each fCell In Ws.Range("a1:a" & Ws.[a65536].End(xlUp).Row)
mEvent$ = fCell.Value
mColour = fCell.Interior.ColorIndex
For Each tCell In Sheets("non-dup").Range("a1:a"
Sheets("non-dup").[a65536].End(xlUp).Row)

If tCell.Value = mEvent Then
tCell.Interior.ColorIndex = mColour
Exit For
End If
Next tCell
For Each tCell In Sheets("master").Range("a1:a"
Sheets("master").[a65536].End(xlUp).Row)
If tCell.Value = mEvent Then
tCell.Interior.ColorIndex = mColour
Exit For
End If
Next tCell
Next fCell
End Select
Next W

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com

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



All times are GMT +1. The time now is 07:04 PM.

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"