Date Addition using excluding weekends (Friday) in VBAStop Excel from automatically converting certain text values to datesVBA Incrementing Date ErrorHow to avoid using Select in Excel VBAExcel VBA - Find previous dateExcel VBA - Convert Text to Date?VBA not updating PivotTable date rangesExcluding weekends in a randomly generated non-repeating datesDate range filter VBAVBA Excel code that autopopulates the next day's date, but only for weekdaysStop changing date value in VBA

Was there ever a difference between 'volo' and 'volo'?

Can I say "if a sequence is not bounded above, then it is divergent to positive infinity" without explicitly saying it's eventually increasing?

How to explain to a team that the project they will work for 6 months will 100% fail?

Whats the name of this projection?

How to help new students accept function notation

Using Select on Dataset with missing keys

Unexpected route on a flight from USA to Europe

In a topological space if there exists a loop that cannot be contracted to a point does there exist a simple loop that cannot be contracted also?

Is this cheap "air conditioner" able to cool a room?

Traveling from Germany to other countries by train?

Is it true that control+alt+delete only became a thing because IBM would not build Bill Gates a computer with a task manager button?

Can we use other things than single-word verbs in our dialog tags?

How to avoid ci-driven development..?

Does the Voyager team use a wrapper (Fortran(77?) to Python) to transmit current commands?

How do I change the output voltage of the LM7805?

Did silent film actors actually say their lines or did they simply improvise “dialogue” while being filmed?

Double blind peer review when paper cites author's GitHub repo for code

Need help understanding lens reach

Infeasibility in mathematical optimization models

Is Odin inconsistent about the powers of Mjolnir?

Did WWII Japanese soldiers engage in cannibalism of their enemies?

Is multiplication of real numbers uniquely defined as being distributive over addition?

How can glass marbles naturally occur in a desert?

Can a PC attack themselves with an unarmed strike?



Date Addition using excluding weekends (Friday) in VBA


Stop Excel from automatically converting certain text values to datesVBA Incrementing Date ErrorHow to avoid using Select in Excel VBAExcel VBA - Find previous dateExcel VBA - Convert Text to Date?VBA not updating PivotTable date rangesExcluding weekends in a randomly generated non-repeating datesDate range filter VBAVBA Excel code that autopopulates the next day's date, but only for weekdaysStop changing date value in VBA






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I Have a code which gives in "H5" cell excluding Fridays but it refers from "H4". And I need "H4" Also excluding Fridays.



Sub DateAddition()

Range("H4").Value = DateAdd("d", 1, CDate(Range("H4").Value))

Range("H5").Value = WorksheetFunction.WorkDay_Intl(Range("H4").Value, 1, 16, 0)

End Sub


I've tried using Like this Unfortunately Doesn't work.



Range("H4").Value = DateAdd("d", 1, CDate(WorksheetFunction.WorkDay_Intl(Range("H4").Value, 1, 16, 0))


I Know if a change given to this line i can make it. But Dont Know the code



Range("H4").Value = DateAdd("d", 1, CDate(Range("H4").Value))


I need "H4" Cell out put to be a date must exclude Fridays










share|improve this question
































    0















    I Have a code which gives in "H5" cell excluding Fridays but it refers from "H4". And I need "H4" Also excluding Fridays.



    Sub DateAddition()

    Range("H4").Value = DateAdd("d", 1, CDate(Range("H4").Value))

    Range("H5").Value = WorksheetFunction.WorkDay_Intl(Range("H4").Value, 1, 16, 0)

    End Sub


    I've tried using Like this Unfortunately Doesn't work.



    Range("H4").Value = DateAdd("d", 1, CDate(WorksheetFunction.WorkDay_Intl(Range("H4").Value, 1, 16, 0))


    I Know if a change given to this line i can make it. But Dont Know the code



    Range("H4").Value = DateAdd("d", 1, CDate(Range("H4").Value))


    I need "H4" Cell out put to be a date must exclude Fridays










    share|improve this question




























      0












      0








      0








      I Have a code which gives in "H5" cell excluding Fridays but it refers from "H4". And I need "H4" Also excluding Fridays.



      Sub DateAddition()

      Range("H4").Value = DateAdd("d", 1, CDate(Range("H4").Value))

      Range("H5").Value = WorksheetFunction.WorkDay_Intl(Range("H4").Value, 1, 16, 0)

      End Sub


      I've tried using Like this Unfortunately Doesn't work.



      Range("H4").Value = DateAdd("d", 1, CDate(WorksheetFunction.WorkDay_Intl(Range("H4").Value, 1, 16, 0))


      I Know if a change given to this line i can make it. But Dont Know the code



      Range("H4").Value = DateAdd("d", 1, CDate(Range("H4").Value))


      I need "H4" Cell out put to be a date must exclude Fridays










      share|improve this question
















      I Have a code which gives in "H5" cell excluding Fridays but it refers from "H4". And I need "H4" Also excluding Fridays.



      Sub DateAddition()

      Range("H4").Value = DateAdd("d", 1, CDate(Range("H4").Value))

      Range("H5").Value = WorksheetFunction.WorkDay_Intl(Range("H4").Value, 1, 16, 0)

      End Sub


      I've tried using Like this Unfortunately Doesn't work.



      Range("H4").Value = DateAdd("d", 1, CDate(WorksheetFunction.WorkDay_Intl(Range("H4").Value, 1, 16, 0))


      I Know if a change given to this line i can make it. But Dont Know the code



      Range("H4").Value = DateAdd("d", 1, CDate(Range("H4").Value))


      I need "H4" Cell out put to be a date must exclude Fridays







      excel vba






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 27 at 8:00









      Pᴇʜ

      31.2k6 gold badges30 silver badges56 bronze badges




      31.2k6 gold badges30 silver badges56 bronze badges










      asked Mar 27 at 5:49









      Afzal AshrafAfzal Ashraf

      33 bronze badges




      33 bronze badges

























          1 Answer
          1






          active

          oldest

          votes


















          0














          Just use the same as you did for H5. The WorksheetFunction.WorkDay_Intl method is already adding one day (given by the second parameter which is 1) so you don't need to use DateAdd.



          Option Explicit

          Sub DateAddition()
          Range("H4").Value = WorksheetFunction.WorkDay_Intl(Range("H4").Value, 1, 16, 0)
          Range("H5").Value = WorksheetFunction.WorkDay_Intl(Range("H4").Value, 1, 16, 0)
          End Sub





          share|improve this answer

























          • How About Subtracting the date

            – Afzal Ashraf
            Mar 30 at 6:20











          • @AfzalAshraf You should really read the documentation if I already give you the direct link: "Days - The number of workdays before or after the start_date. A positive value yields a future date; a negative value yields a past date; a 0 (zero) value yields the start_date. Day-offset is truncated to an integer."

            – Pᴇʜ
            Mar 30 at 7:53











          • I'm Sorry I didn't Check that. But Now I understood. You are very Kind and Helpful!

            – Afzal Ashraf
            Mar 30 at 10:12










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55370586%2fdate-addition-using-excluding-weekends-friday-in-vba%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Just use the same as you did for H5. The WorksheetFunction.WorkDay_Intl method is already adding one day (given by the second parameter which is 1) so you don't need to use DateAdd.



          Option Explicit

          Sub DateAddition()
          Range("H4").Value = WorksheetFunction.WorkDay_Intl(Range("H4").Value, 1, 16, 0)
          Range("H5").Value = WorksheetFunction.WorkDay_Intl(Range("H4").Value, 1, 16, 0)
          End Sub





          share|improve this answer

























          • How About Subtracting the date

            – Afzal Ashraf
            Mar 30 at 6:20











          • @AfzalAshraf You should really read the documentation if I already give you the direct link: "Days - The number of workdays before or after the start_date. A positive value yields a future date; a negative value yields a past date; a 0 (zero) value yields the start_date. Day-offset is truncated to an integer."

            – Pᴇʜ
            Mar 30 at 7:53











          • I'm Sorry I didn't Check that. But Now I understood. You are very Kind and Helpful!

            – Afzal Ashraf
            Mar 30 at 10:12















          0














          Just use the same as you did for H5. The WorksheetFunction.WorkDay_Intl method is already adding one day (given by the second parameter which is 1) so you don't need to use DateAdd.



          Option Explicit

          Sub DateAddition()
          Range("H4").Value = WorksheetFunction.WorkDay_Intl(Range("H4").Value, 1, 16, 0)
          Range("H5").Value = WorksheetFunction.WorkDay_Intl(Range("H4").Value, 1, 16, 0)
          End Sub





          share|improve this answer

























          • How About Subtracting the date

            – Afzal Ashraf
            Mar 30 at 6:20











          • @AfzalAshraf You should really read the documentation if I already give you the direct link: "Days - The number of workdays before or after the start_date. A positive value yields a future date; a negative value yields a past date; a 0 (zero) value yields the start_date. Day-offset is truncated to an integer."

            – Pᴇʜ
            Mar 30 at 7:53











          • I'm Sorry I didn't Check that. But Now I understood. You are very Kind and Helpful!

            – Afzal Ashraf
            Mar 30 at 10:12













          0












          0








          0







          Just use the same as you did for H5. The WorksheetFunction.WorkDay_Intl method is already adding one day (given by the second parameter which is 1) so you don't need to use DateAdd.



          Option Explicit

          Sub DateAddition()
          Range("H4").Value = WorksheetFunction.WorkDay_Intl(Range("H4").Value, 1, 16, 0)
          Range("H5").Value = WorksheetFunction.WorkDay_Intl(Range("H4").Value, 1, 16, 0)
          End Sub





          share|improve this answer













          Just use the same as you did for H5. The WorksheetFunction.WorkDay_Intl method is already adding one day (given by the second parameter which is 1) so you don't need to use DateAdd.



          Option Explicit

          Sub DateAddition()
          Range("H4").Value = WorksheetFunction.WorkDay_Intl(Range("H4").Value, 1, 16, 0)
          Range("H5").Value = WorksheetFunction.WorkDay_Intl(Range("H4").Value, 1, 16, 0)
          End Sub






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 27 at 8:05









          PᴇʜPᴇʜ

          31.2k6 gold badges30 silver badges56 bronze badges




          31.2k6 gold badges30 silver badges56 bronze badges















          • How About Subtracting the date

            – Afzal Ashraf
            Mar 30 at 6:20











          • @AfzalAshraf You should really read the documentation if I already give you the direct link: "Days - The number of workdays before or after the start_date. A positive value yields a future date; a negative value yields a past date; a 0 (zero) value yields the start_date. Day-offset is truncated to an integer."

            – Pᴇʜ
            Mar 30 at 7:53











          • I'm Sorry I didn't Check that. But Now I understood. You are very Kind and Helpful!

            – Afzal Ashraf
            Mar 30 at 10:12

















          • How About Subtracting the date

            – Afzal Ashraf
            Mar 30 at 6:20











          • @AfzalAshraf You should really read the documentation if I already give you the direct link: "Days - The number of workdays before or after the start_date. A positive value yields a future date; a negative value yields a past date; a 0 (zero) value yields the start_date. Day-offset is truncated to an integer."

            – Pᴇʜ
            Mar 30 at 7:53











          • I'm Sorry I didn't Check that. But Now I understood. You are very Kind and Helpful!

            – Afzal Ashraf
            Mar 30 at 10:12
















          How About Subtracting the date

          – Afzal Ashraf
          Mar 30 at 6:20





          How About Subtracting the date

          – Afzal Ashraf
          Mar 30 at 6:20













          @AfzalAshraf You should really read the documentation if I already give you the direct link: "Days - The number of workdays before or after the start_date. A positive value yields a future date; a negative value yields a past date; a 0 (zero) value yields the start_date. Day-offset is truncated to an integer."

          – Pᴇʜ
          Mar 30 at 7:53





          @AfzalAshraf You should really read the documentation if I already give you the direct link: "Days - The number of workdays before or after the start_date. A positive value yields a future date; a negative value yields a past date; a 0 (zero) value yields the start_date. Day-offset is truncated to an integer."

          – Pᴇʜ
          Mar 30 at 7:53













          I'm Sorry I didn't Check that. But Now I understood. You are very Kind and Helpful!

          – Afzal Ashraf
          Mar 30 at 10:12





          I'm Sorry I didn't Check that. But Now I understood. You are very Kind and Helpful!

          – Afzal Ashraf
          Mar 30 at 10:12








          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55370586%2fdate-addition-using-excluding-weekends-friday-in-vba%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript