My apologies if all the text in this document is in German, I'll try to explain it as well as possible.
Basically, this is just a sheet that contains the dates and times an employee was working. All the weekdays are automatically generated, e.g. when the month is set to October 2013, the weekdays automatically update. ("Di" -> "Tu"/tuesday, "Mi" -> "We"/wednesday, ...)
This works out alright, so I don't have any problems with that. What the actual goal is, I wanted to make it a little bit better readable by adding thicker lines after every sunday, signalizing the end of the week.
Using the conditional formatting, I've managed to do that for every line. E.g. for line 14, I used the formula =MOD(VALUE($B$14);7)=1 to determine, if the value in column B and line 14 is in fact a sunday. If the modulus of the weekday divided by 7 is 1, then it is a sunday and the formatting style is applied to those cells.
Now, this formula makes it a little hard to work with. I'd basically have to copy-paste the lines each time and change the line number for each line. I thought it would be possible to make it more dynamic by leaving out the $-symbol (=MOD(VALUE($B1);7)=1), but for some reason it didn't work for me.
What do I have to type in inside VALUE to reference the B-Column in the same line?
Okay, the issue was that you were applying your condition on a range on the wrong active cell.
An active cell is the only cell which is slightly less blue in the selected region; for instance, in the picture below, the active cell is A1:
And if this is the active cell, you will be able to use your formula:
=MOD(VALUE($B1);7)=1
There's a simpler formula though:
=WEEKDAY($B1)=1
This means that if the active cell was A32 or H32 in the picture, the formula wouldn't have worked, because the condition for formatting is being applied to the wrong cell!
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments