English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

What will this formula do?? I need to enter a formula today (01/22/07) that will automatically update the date each day but won't include weekends. I don't understand formulas well. I want to be able to type one formula now and have it stay that way. For example, on Tuesday night, I print a schedule with Wednesday's date on it. On Friday night, I print a schedule with Mondays date.

PLEASE HELP!!

2007-01-22 09:14:41 · 2 answers · asked by Anonymous in Computers & Internet Other - Computers

2 answers

Your function is correct, CRA is wrong.
Your function says that if today is Friday, then show the date of next Monday, if not, show the date of tomorrow
If this is what you need then it is working fine.
If this is not what you are looking for, mail me here in Y! Answers to show you how you do it.
or visit my site
http://projects.file1.net
you can find a calendar there (Excel-function-based calendar) free to download in
http://www.projects.file1.net/project.php?id=calendar&page=1

Trust me, I am the VBAXLMan

2007-01-23 00:58:25 · answer #1 · answered by Anonymous · 1 0

First of all.... That formula is wrong for what you are trying to do... You are trying to make a formula to say the day of the week but not including saturday or sunday.... that formula will include sunday.... I will explain how it works:

The formula is composed of a huge =IF().... I guess you know how the IF() function works... but if not, here is how it works

=IF([logical_test],[if_true],[if_false])

The IF function you have has as a test "WEEKDAY(TODAY())=6"

***WEEKDAY(TODAY()) will give you "the current day of the week".... the test is saying that "the current day of the week" is 6 (which means Friday)...

If it is friday then the statement will be true and the action to take it "TODAY()+3", which in turn will give you the day Monday on a Friday...

Thats good, and thats what you wanted.... but what if you print the page on saturday and not on friday... then the IF statement would be false and it will add 1 to the current day of the week (TODAY()+1)... and you will end up with something saying Sunday instead of Monday....

Do you get it?.... It is very hard to explain this things for me... I understand them in my own way....
But I will give you the right formula:

=IF(WEEKDAY(TODAY())=6,TODAY()+3,IF(WEEKDAY(TODAY())=7,TODAY()+2,TODAY()+1))

That formula will give you Tuesday on Monday, Wednesday on Tuesday, Thursday on Wednesday, Friday on Thursday and Monay on Friday, Saturday, and Sunday......

That formula has it all cover...

Just remember to change the category of the cell to custom dddd to get the day of the week spelled instead of the 5 digit number representing the date.... unless you want it as a date, then change the category of the cell to date....

Any questions, send me a email to cra_88@hotmail.com
*** IMPORTANT ***
Something about your function that I already stated is that if you print the thing on saturday you will get it with the sunday date, not monday... and you want only weekdays.... even if you print on weekends.....

2007-01-22 11:09:49 · answer #2 · answered by CRA 3 · 0 2

fedest.com, questions and answers