Tip:
Highlight text to annotate it
X
you can download
the .ods document spreadsheet created in this tutorial
at the frugalcomputerguy.com go to the video
tutorials office spreadsheet
and on this page will place the download
the in this video tutorial
we're going to look at the Weekday function
the weekday() function some you may wonder why we need a function to tell us the day of the
week because, we can do this with formatting as a I'll show you right here
and B5 we've got our dates and
column A we've got a copy of what is in column B
If we reformat this
Format Cells and
I need to go to user defined to make the day show
we click on DDD
in the box here we can see Sunday
clicking OK we see each day of the week
I'm going to center those so, why do we need a weekday function
what the problem now is we can't do any kind of manipulation on
if it's a Sunday if it's a Monday we don't take deliveries
I'm Tuesday's only on Wednesday so there's no way to tell
unless we have this weekday function how this week the function works is
we say =Weekday(
the
date that we want to have looked at
and I'm going to use B5 and then the type
which is in my first case 1 - I'll copy this
using control+C highlighting
and control+V I also want to center this
just so it looks a little nicer now to see exactly what
what we're looking at or to remind us all
I'm going to say equals formula
C5
and that shows us that in Column C we are looking at weekday
B5,1 in this first example
C5
what the other option is
=Weekday(B5,2)
and this one is showing
that sunday is seven so in
let me finish the whole thing here before I start talking about it =Formula
D5 so now we can see
and I'm double-clicking to autosize the column
and I want to center this and copy this formula
all the way down so we have everything showing
we can see that if we use type one
Sunday is our first day of the week
if we use type 2 Monday is our day of the week where that might come in handy
is... let's do some conditional formatting
we've done some before so I'm going to create
in New create in New
style and I will call this
weekday and
I will need to modify it, make the weekdays
the yellow here and then we need to create
style for the weekend new style weekend
and
I will make this one green
already and we don't need to show what that is
I'm going to control+c control+v we don't want that cell that I just happen to be in when I
created my style showing we want to
highlight our box and format
conditional formatting if formula
is equals B5
less than 6
it we know that it will be weekday
because we're using Column B
which is styled too so 6 & 7 will be the
weekend and one through five weekday so we know that it's less than six it is a
weekday our condition 2 is formula
D5 is greater than
5 you know it's a weekend so we make this week
and we had one little problem with this
format and that is that
let's take a look again
format conditional formatting We said D
so when it went to B this went to E when this
went to C it went to F so we need to keep this
in column D by using the dollar sign to anchor and I do have
video explaining anchoring in full detail
and now we have it all
showing that our weekends are one color and our weekdays
are another and you could pick out a day the Week
or however you would like to use it but basically
this is how the weekday function works and basic reason of
why you would want to use it all
all cool all