JonnnyExcel
New Member
- Joined
- Feb 9, 2011
- Messages
- 8
I am trying to figure out a function to find the last working day that is not a weekend or holiday. I have searched this board and others and can’t find a function to do this task.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o></o>
I have found a formula to make sure the previous day is not a weekend “=IF(WEEKDAY(B6)=7,B6-1,IF(WEEKDAY(B6)=1,B6-2,B6”, where B6 is the cell with date being checked. <o></o>
<o></o>
I have a Vlookup to find out if the date in B6 is a holiday “=IFERROR(VLOOKUP(B6,G2:G4,1,FALSE),0” where the holidays are listed in cells, G2 to G4.<o></o>
<o></o>
I am struggling to piece these 2 formulas together as the previous could be a weekend or a holiday. <o></o>
For example, our company doesn’t work Thanksgiving Day and the following day (11/24, 11/25/2011). On Monday (11/28/2011) the previous working day is Wednesday 11/23/2011.<o></o>
<o></o>
I am aware of the workdays and networkdays functions in Excel but can’t seem to get them to work in my case.<o></o>
<o></o>
Any help would be appreciated, thank you.<o></o>
Jon
<o></o>
I have found a formula to make sure the previous day is not a weekend “=IF(WEEKDAY(B6)=7,B6-1,IF(WEEKDAY(B6)=1,B6-2,B6”, where B6 is the cell with date being checked. <o></o>
<o></o>
I have a Vlookup to find out if the date in B6 is a holiday “=IFERROR(VLOOKUP(B6,G2:G4,1,FALSE),0” where the holidays are listed in cells, G2 to G4.<o></o>
<o></o>
I am struggling to piece these 2 formulas together as the previous could be a weekend or a holiday. <o></o>
For example, our company doesn’t work Thanksgiving Day and the following day (11/24, 11/25/2011). On Monday (11/28/2011) the previous working day is Wednesday 11/23/2011.<o></o>
<o></o>
I am aware of the workdays and networkdays functions in Excel but can’t seem to get them to work in my case.<o></o>
<o></o>
Any help would be appreciated, thank you.<o></o>
Jon