I SEE NO VB CODE AND YET IT HIGHLIGHTS SAT N SUNDAYS. ANYONE INTERESTED TO FIND OUT HOW IT IS DONE

C

CAPTGNVR

DEAR ALL
I came across this file which is used for marking the overtime for the
crew. On checking found no VB code nothing and yet on entering month
name it highlights the saturdays and sundays.

I looked into the project, modules and 'worksheet selection change' -
all are blank.

So where else i turn to nowadays otherthan this forum. Pls solve my
curiosity to know how this was done. The file is about 17kb zipped
and will send it on your request.
 
S

Sandy Mann

CAPTGNVR,

Highlight the cells that are becoming highlighted and check for Conditional
Formatting

Format > Conditional Formatting....

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

[email protected]
[email protected] with @tiscali.co.uk
 
C

CAPTGNVR

CAPTGNVR,

Highlight the cells that are becoming highlighted and check for Conditional
Formatting

Format > Conditional Formatting....

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

[email protected]
[email protected] with @tiscali.co.uk

D/DAVID AND SANDY

By highlighting on the cells getting highlighted nothing shows in the
cond formtng. But if i click any cell it takes it as col A cell. For
example if click g12, it is shown as $a12. I have copied the formula
to further ustand..

In the first condition - formula is- option and the foll formula:
=MOD(DATE(YEAR($AB$3),MONTH($AB$3),$A12),7)=1

seond condition - formula is - and the formula as follows:
=MOD(DATE(YEAR($AB$3),MONTH($AB$3),$A12),7)=0

so on clciking cell ab3 and entering month, it calculates true or
false and colors the line from A to AB.
Does it take the highlighting range 'A' to 'AB' bcos it is mentioned
as row absolute as $A??
 
D

David Biddulph

Yes, the absolute reference for row and column in $AB$3 means that it picks
up the year and month from $AB$3, and then the absolute column reference in
$A12 means that the format for the whole row (or as much of it has the
conditional format applied) is based on the formula, using the number in
column A as the day of the month.

To make it clear that it is looking for particular days of the week, one
could have used the WEEKDAY() function, rather than MOD(... ,7), but it
amounts to the same thing.
 
Top