Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2006

Tip: Looking for answers? Try searching our database.

Macro help required

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Don - 25 Jan 2006 22:03 GMT
Hi,
I am preparing a basic excel worksheet to present various projects using a 1
line (row) entry for each project. One cell in each row will hold a color
based 'status value', while the next cell will show trend.

I am using 4 colors to represent the status, and a +, - or = to represent
trend. So if trend is + it means a positive move in status since last
reporting period (eg status went from red to green, where red represents
serious issues while green represents everything on track). Up to this point
I have simply been using the conditional formatting. However, I think I need
to consider using macros as:
(a) I need an additional color in status (ie 5 colors) and,
(b) I want the trend symbol to be color coded (eg if status is green during
last reporting period, and there is no change, then trend = is green. However
if status is red from last reporting period, and there is no change, then
trend = is red.).

I am not entirely familiar with macro language but feel if I get a start I
will find my way .....
Could someone outline how I make a start to define macro:
- if user inputs a 'r' into 'status' cell (cell x), then the cell is turned
red (a red fill), and the 'r' font turns to red,
- if status is 'r' the trend (cell z) can only be - or =, and this should
follow the same color as status,
- if status is 'a' (amber) meaning minor issues, the trend cell can be
either = or +. If its = then follow same color as status (ie amber), if its +
then show as green.

I believe this should be pretty easy to code, but I haven't worked with
macros : (

Help greatly appreciated,

Thx,

Don-
Bob Phillips - 25 Jan 2006 23:57 GMT
I can only see 3 colours, not 5.

If status is amber, why can't trend be -, if previously green?

I would do it with CF on the status cell, just test the letter r,a, or g and
colour accordingly.

On the trend, I would use Data Validation with a formula of

=OR(AND(A21="r",OR(B21="-",B21="=")),AND(A21="a",OR(B21="-",B21="=",B21="+")
),AND(A21="g",OR(B21="+)",B21="=")))

assuming the trend cell is B21, and then use CF to colour with formulae of

=OR(A21="r",AND(A21="a",B21="-"))
=OR(A21="g",AND(A21="a",B21="+"))
=A21=""

Signature

HTH

Bob Phillips

(remove nothere from email address if mailing direct)

> Hi,
> I am preparing a basic excel worksheet to present various projects using a 1
[quoted text clipped - 32 lines]
>
> Don-
Don - 26 Jan 2006 07:21 GMT
Bob,

Thanks for reply. You atre correct re:amber (-was rushing this last night :
(..

There are in fact 5 colors:
green=ok, amber=minor issues, red = major issues, blue=completed/cancelled
and
we have another color (TBD) to address a specific state.

Does this change the complexion of your response?

Thx,

Don-

> I can only see 3 colours, not 5.
>
[quoted text clipped - 57 lines]
> >
> > Don-
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.