+ Reply to Thread
Results 1 to 7 of 7

Macro to add so many days if a cell equals todays date

  1. #1
    Registered User
    Join Date
    04-05-2012
    Location
    uk
    MS-Off Ver
    Excel 07
    Posts
    77

    Macro to add so many days if a cell equals todays date

    If cell a1 equals todays date add cell b2s value to it and put the new date back into cell a1.

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Macro to add so many days if a cell equals todays date

    if range("a1").value=date() then range("a1").value =dateadd("d",range("b1").value,range("a1").value)

    Please would have been nice
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Registered User
    Join Date
    04-05-2012
    Location
    uk
    MS-Off Ver
    Excel 07
    Posts
    77

    Re: Macro to add so many days if a cell equals todays date

    Thanks nathansav ,sorry my heads all over the place . I am grateful for your help , is there any way to continue it example if a2 equals todays date add b2 and put into a2,

    Many thanks
    RJM

  4. #4
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Macro to add so many days if a cell equals todays date

    if range("a1").value=date() then range("a2").value =dateadd("d",range("b2").value,range("a1").value)

  5. #5
    Registered User
    Join Date
    04-05-2012
    Location
    uk
    MS-Off Ver
    Excel 07
    Posts
    77

    Re: Macro to add so many days if a cell equals todays date

    Sorry Im not very good at explaining things, I would like it to basically do it for rows 1 to 20, If the date in colum a = todays date add whats in that row for colum b and put answer into colum .

    Many Thanks
    RJM

  6. #6
    Registered User
    Join Date
    04-05-2012
    Location
    uk
    MS-Off Ver
    Excel 07
    Posts
    77

    Re: Macro to add so many days if a cell equals todays date

    Please Login or Register  to view this content.
    Changed the code to the above and working , Thanks for all your help nathansav your a star

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Macro to add so many days if a cell equals todays date

    Maybe:

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. changing colour of cell if todays date equals the first day of the month
    By ConfusedaboutVBA in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-24-2013, 08:03 PM
  2. Replies: 8
    Last Post: 02-08-2013, 04:29 AM
  3. excel formula: days remaining=end date-todays date+extention days
    By fsprings in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 01-04-2013, 06:45 AM
  4. Todays date + 28 days + 2 week days
    By tubbsy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-18-2008, 12:39 PM
  5. [SOLVED] How to put todays date in one cell then the next cell adds x days
    By trekkies in forum Excel General
    Replies: 1
    Last Post: 01-06-2006, 12:34 AM

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