Originally Posted by Ron Coderre
Hi was just looking through this thread and was quite interested..can you please explain in plain english what the last bit means...(E10,2 ETC....... E10-WEEKDAY(E10,2)+1[/CODE]
Thanks
Originally Posted by Ron Coderre
Hi was just looking through this thread and was quite interested..can you please explain in plain english what the last bit means...(E10,2 ETC....... E10-WEEKDAY(E10,2)+1[/CODE]
Thanks
So...If you subtract a date's weekday_num from the date,![]()
With E10: (a date) E11: =E10-WEEKDAY(E10,2)+1 WEEKDAY(E10,2) returns the weekday_number of the date in E10 where: Mon = 1, Tue = 2, Wed = 3, Thu = 4, Fri = 5, Sat = 6, Sun = 7
the result is the Sunday date prior to that date.
Adding 1 to that value is the Monday date for the week containing the date in E10.
Note: You can designate which day you want the week to start on![]()
Example: E10: 07/15/2008.....(a Tuesday) • WEEKDAY(E10,2)....returns: 2 • =E10-WEEKDAY(E10,2) =07/15/2008 - 2 days =07/13/2008......(a Sunday) • =E10-WEEKDAY(E10,2)+1 =07/15/2008 - 2 days + 1 day =07/14/2008......(a Monday)
in the WEEKDAY function by setting the 2nd argument value.
See Excel Help on that function for the details.
I hope that helps.
Hi, Ron -
I'm seeing this in other formulas that I'm coming across and am not sure why it's written this way. You used it above:
F11: =+E11+1Why is there a + sign right after the = sign? Why not just write it
F11: =E11+1When I plug it in, I'm not seeing a difference either way.
Curious,
Emil
You're correct...in that instance, there's no difference.
I don't routinely type the equal sign AND the leading plus sign (+).
It's probably there because I typed the plus sign then selected
cell E11 (and Excel put the equal sign in for me). Other times I may start
with the equal sign before selecting cells.
I hope that helps.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks