# Excluding Weekends in a IF function

1. ## Excluding Weekends in a IF function

Morning All,

I'm looking for some help with building a formula.

I have a spreadsheet that determines a date dependent on a certain criteria. For example, if a specific column displays "Exempt" - then the result will be the same as the date two rows above (same column). However, if it doesn't display exempt, it will take the same date (two rows above) and add on the sum in another column.

My issue is this; how do I get it to exclude Weekends? I've seen formulas such as WEEKDAYS and NETWORKDAYS however I'm not sure how to include it into my current formula.

At the moment my FORMULA looks like this =IF(NOT(X13="EXEMPT"),(DATE(YEAR(R11),MONTH(R11),DAY(R11)+(Q13+1))),IF(X13="EXEMPT",R12))

All help is greatly appreciated.

2. ## Re: Excluding Weekends in a IF function

I think you want to use WORKDAY -- modifying your existing formula, which doesn't appear to align to your narrative, perhaps:

Formula:
`Please Login or Register  to view this content.`

so the above will add n days (Mon-Fri) to your date in R11.

3. ## Re: Excluding Weekends in a IF function

Howabout if I want to add the WORKDAY to the IF(NOT(X13="EXEMPT") part? how would I work in the workday formula without disrupting the YEAR, MONTH, DAY, format?

4. ## Re: Excluding Weekends in a IF function

Unusual way to write an IF formula:
Formula:
`Please Login or Register  to view this content.`

It can be just
Formula:
`Please Login or Register  to view this content.`

Not sure how you want to exclude weekend dates. Probably best to post a sample workbook with some worked examples ... what result do you actually want?

Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

Remember to desensitize the data.

Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

5. ## Re: Excluding Weekends in a IF function

Originally Posted by zakallen

Howabout if I want to add the WORKDAY to the IF(NOT(X13="EXEMPT") part? how would I work in the workday formula without disrupting the YEAR, MONTH, DAY, format?
I would suggest testing the solution provided against your current formula, not forgetting to format the cell as a date.

6. ## Re: Excluding Weekends in a IF function

Hi,

I'm looking at Column R. I've got two testing machines and for no.1 and no.2 the next Unique ID cannot be tested until its Testing bay is available. IE. REF0005 can't commence testing until REF0003 has finished as they are both on the same Test bay.
I just need to work out a formula for Column R, which will say for example, 'For testing bay 1, if Column T doesn't show Exempt for a SKU, then it will return the completion date of the last SKU on the same testing bay. But this cannot be a weekend.

7. ## Re: Excluding Weekends in a IF function

Hi, sorry for belated response, I'll confess that I can't quite follow the above narrative -- all I can say is that the below:

Formula:
`Please Login or Register  to view this content.`

can be re-written as below - if adding the days on a Mon-Fri basis

Formula:
`Please Login or Register  to view this content.`

so the above would return Thu 31st January rather than Sun 27th January as it will ignore weekends when adding the 9.69* days to the date in R2.

If you want it to add the 9.69* days ignorant of days of week and then ensure it lands on a workday (i.e Mon 28th) you can use

Formula:
`Please Login or Register  to view this content.`

However, I suspect you want the first suggestion?

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1