+ Reply to Thread
Results 1 to 2 of 2

loop date calculation macro

  1. #1
    Registered User
    Join Date
    10-20-2010
    Location
    Chicago, Illinois
    MS-Off Ver
    Excel 2007
    Posts
    69

    loop date calculation macro

    i have a list of dates in column A, i need a macro that will tell excel to look at the date in cell A1 for example and if the date in cell A1 happens to be a weekend or US bank holiday it needs to populate the next business date in cell B1, if cell A1 is a business date, then just populate cell B1 with the same date....is there a macro that can do this?...it would need to do this for cells A1 to A??, on different sheets i would have column A populated down to different number of rows. so the macro would have to do some kind of looping i guess. I have a variable RowCount that i created that counts the number of rows that have data in it. lets say the value of the variable RowCount is 10, this means that the last row that has data in it in column A is row 10. so how would the macro look like that does this?

    thanks

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2003
    Location
    British Columbia , Canada
    MS-Off Ver
    03,07,10,13
    Posts
    727

    Re: loop date calculation macro

    HOW IT WORKS...
    First you must have a sheet , in same book as macro, called "DaysOff". Column A on the "DaysOff" sheet should list any days off (in date format) that are not on the weekend. (any dates that fall on a weekend will be taken care of automatically.

    Second Select the column where the current dates are.(the dates you want changed NOT the dates on the DaysOff sheet)

    Third : run macro


    Please Login or Register  to view this content.
    Last edited by nimrod; 03-04-2011 at 08:23 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Bookmarks

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