title: VBA - Add days with weekends, less the weekend of actual week
body: <p>I want to create a VBA code where you take one weekday, <code>d</code> add <code>n</code> number of days to it and it will return the date <code>n</code> number of days later, <code>y</code>, excluding the weekend during the week of <code>d</code>. Note: if <code>y</code> falls on the weekend, it should return the previous weekday. </p>
  
  <pre><code>d + n - (weekend of d week) = y
  </code></pre>
  
  <p>For example, tomorrow is 09/27, if I count 14 days after, including weekends, less the weekend of this week. Would be, something like this: </p>
  
  <pre><code>09/27 + 14 days - (weekend of 09/27 week) = 10/12
  
  
  Tomorrow: 09/27
  +1: 09/28
  Not Counted: 09/29 (Saturday of this week)
  Not Counted: 09/30 (Sunday of this week)
  +2: 10/01 (Here pass for the next workday, and from here can count the weekends after)
  +3: 10/02
  +4: 10/03
  +5: 10/04
  +6: 10/05
  +7: 10/06 (this day is Saturday, can be counted)
  +8: 10/07 (this day is Sunday, can be counted)
  +9: 10/08
  +10: 10/09
  +11: 10/10
  +12: 10/11
  +13: 10/12
  +14 10/13 &lt;- adding the days fall on this date. But, this day is a Saturday, so, comes back to previous workday, which is 10/12
  </code></pre>
  
  <p>How can I build something like this ?</p>