Solved

EOMONTH and WEEKDAY and add days

Posted on 2014-11-04
12
191 Views
Last Modified: 2014-11-04
Hello, I have modified the EOMONTH formula with a WEEKDAY function. However, after I add WEEKDAY and add a parenth, the return is a date but it is in 1900 so I think I have done something wrong.  Do you see what is the issue?   I also want to add days to this formula and not certain where exactly to add the days.  The days added needs to also take into account if lands on a weekend then go to the next weekday.  

this is how I have it now.  I added the WEEKDAY part.
=WEEKDAY(EOMONTH(H67,MOD(12-MONTH(H67),3)))
0
Comment
Question by:pdvsa
12 Comments
 
LVL 65

Expert Comment

by:Jim Horn
Comment Utility
>EOMONTH and WEEKDAY and add days
Please explain in a format that Barney the Big Purple Dinosaur would understand what exactly you're trying to do here, as I can't see a question here.
0
 
LVL 24

Expert Comment

by:Phillip Burton
Comment Utility
If you want to add days, you don't use the WEEKDAY function.

Your formula currently goes to the end of some month. If you want to add 10 days to the end, try:

=EOMONTH(H67,MOD(12-MONTH(H67),3)) + 10
0
 

Author Comment

by:pdvsa
Comment Utility
Jim,

How do I modify
=EOMONTH(H67,MOD(12-MONTH(H67),3))

for WEEKDAY

and add days criteria.
0
 

Author Comment

by:pdvsa
Comment Utility
Philip, I need to add WEEKDAY though.
0
 
LVL 24

Expert Comment

by:Phillip Burton
Comment Utility
Why? What do you think WEEKDAY does (because it probably doesn't)?

WEEKDAY returns a number between 1 and 7.
0
 
LVL 31

Expert Comment

by:Rob Henson
Comment Utility
How about:

=IF(WEEKDAY(EOMONTH(H67,MOD(12-MONTH(H67),3))<6,EOMONTH(H67,MOD(12-MONTH(H67),3)),EOMONTH(H67,MOD(12-MONTH(H67),3))+8-EOMONTH(H67,MOD(12-MONTH(H67),3)))

Thanks
Rob
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:pdvsa
Comment Utility
ahhhh I see why you are confused... I mean WORKWEEK.  I dont know the difference between the two as they seem to be the same to me.  anyways, the date needs to be M-F and not weekends and I need to add date criteria within that function.
0
 

Author Comment

by:pdvsa
Comment Utility
Rob, let me know if that changes something...didnt see your post.
0
 
LVL 24

Assisted Solution

by:Phillip Burton
Phillip Burton earned 500 total points
Comment Utility
I think you mean WORKDAY:

=WORKDAY(EOMONTH(H67,MOD(12-MONTH(H67),3)) -1,1)
0
 

Author Comment

by:pdvsa
Comment Utility
OK and if I wanted to add a certain number of day where would I place that and still have the WORKDAY function apply?
0
 
LVL 24

Accepted Solution

by:
Phillip Burton earned 500 total points
Comment Utility
The last "1" is the number of days to add (less 1).

Currently, a Friday translates as a Friday. A Saturday or Sunday translates as a Monday.

If you want to add 5 working days, change it to:

=WORKDAY(EOMONTH(H67,MOD(12-MONTH(H67),3)) ,5)

If you wanted 5 calendar days, change it to:

=WORKDAY(EOMONTH(H67,MOD(12-MONTH(H67),3))+5 -1,1)

or

=WORKDAY(EOMONTH(H67,MOD(12-MONTH(H67),3))-1,1)+5

depending on your circumstances. The first one adds 5 calendar days, then moves it to the next working day. The second one moves it to the next working day, then adds 5 calendar days.
0
 

Author Closing Comment

by:pdvsa
Comment Utility
Thank you.  I might have to ask a follow up if I find I need to.  Sorry for the confusion with the names of the functions.  I am far from expert.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now