On 18 Nov 2020 at 19:23, Remy Gauthier wrote:
Subject: Re: [libreoffice-users] Easily format cells to
bold and a
From: Remy Gauthier <email@example.com>
Date sent: Wed, 18 Nov 2020 19:23:52 -0500
I am assuming your dates are in column "A", and the data in columns
and next. You can easily do this with conditional formatting:
1) Select your dates and data
2) From the Format menu > Conditional
3) On the Conditional Formatting panel, in the first drop-down,
4) Enter the formula: WEEKDAY(INDIRECT(ADDRESS(ROW(),1)),2)=7
5) Select a style to apply. I would say "Accent 3" is the one you
looking for, but you can create your own and select it there
6) Hit OK. Your Sundays should now be shown in Accent 3 (bold with
What the formula does:
WEEKDAY(date,2): returns the day of week, with Sunday being day 7
ADDRESS(ROW(),1): Dynamically creates the cell address of your
you are on the second row, this formula returns A2
INDIRECT(): Returns the content of; so INDIRECT(ADDRESS(ROW(),1))
row 2 returns the content of A2 (a date since your dates are in
Interesting that you used weekday with the non-default option??
Returns the day of the week for the given date value. The day is
returned as an
integer between 1 (Sunday) and 7 (Saturday) if no type or type=1 is
other types, see the table below.
Number, as a date value, is a decimal for which the weekday is to be
Type is optional and determines the type of calculation.
Weekday number returned
1 or omitted
1 (Sunday) through 7 (Saturday). For compatibility with Microsoft
1 (Monday) through 7 (Sunday).
0 (Monday) through 6 (Sunday)
1 (Monday) through 7 (Sunday).
1 (Tuesday) through 7 (Monday).
1 (Wednesday) through 7 (Tuesday).
1 (Thursday) through 7 (Wednesday).
1 (Friday) through 7 (Thursday).
1 (Saturday) through 7 (Friday).
1 (Sunday) through 7 (Saturday).
Thought I had done something wrong.
I used the formula Weekday($a1)=1 in my example and it works using
the default return values. I changed range to A1:B33 and had the
=weekday(a1) formula in b1-b33 to validate. It then changes the
for both column a and b for the Sundays.
If you want to upload a file, you can go directly on the
nabble.documentfoundation.org page. I believe you can upload a file
with your message from there. You can also send it to me directly
you're stuck and I'll give you a hand.
I hope this helps.
Le mercredi 18 novembre 2020 à 18:40 -0500, . a écrit :
record the weather for each day of the year....it's a
would be simplest if Calc could format each Sunday in
font and a gray background. With many Sundays in a
takes too long to manually change each year's Sundays.
sample Calc sheet I use but don't know where I can
so you can take a look at it.
To unsubscribe e-mail to: firstname.lastname@example.org
Posting guidelines + more:
List archive: https://listarchives.libreoffice.org/global/users/
Impressum (Legal Info)
: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (MPLv2
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our trademark policy