How to write multiple IF conditions for different number of working days to be counted in Excel

Clemetson, Travis B 0 Reputation points
2023-11-20T17:43:40.68+00:00

I had a formula that calculate the number of the working days (excluding the weekends, holidays). Currently the formula (within Column T) is set to calculate 5 working days out from a manually inputted date (Column H). However, I am now needing to add additional factors. within Column M are 3 different categories were within category 1 or 2 are chosen, the formula calculates 5 working days out from the date in Column H. However if Category 3 is selected, I need the formula to calculate 7 working days from the date entered within Column H. Below is the formula I am currently utilizing with AK$2:AK$71 being my list of holidays.

=IF((H539=""),"_",IF(WEEKDAY(H539)=1,WORKDAY(H539,6,AK$2:AK$71),IF(WEEKDAY(H539)=7,WORKDAY(H539,6,AK$2:AK$71),WORKDAY(H539,5,AK$2:AK$71))))

Microsoft 365 and Office Excel For business Windows
{count} votes

1 answer

Sort by: Most helpful
  1. Jiajing Hua 18,060 Reputation points Moderator
    2023-11-22T08:22:00.4933333+00:00

    Hi @Clemetson, Travis B

    Thanks for your response.

    Take '11/21/23' as an example, the result of WEEKDAY(H) is 3, under the case of your previous formula, it calculates 5 working days. But now, there is a Category 3 within Column M, you need to change the formula to calculate 7 working days. Am I right?

    If so, you may try formula WORKDAY(H539,IF(M539=3,7,5),AK$2:AK$71).

    Any misunderstandings, please feel free to let us know.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.