Results 1 to 21 of 21

Adding 7 days to a date using macro

Threaded View

ninjao Adding 7 days to a date using... 02-25-2009, 11:54 AM
mudraker Re: Adding 7 days to a date... 02-26-2009, 02:53 AM
ninjao Re: Adding 7 days to a date... 02-26-2009, 05:04 AM
royUK Re: Adding 7 days to a date... 02-26-2009, 03:53 AM
royUK Re: Adding 7 days to a date... 02-26-2009, 05:13 AM
ninjao Re: Adding 7 days to a date... 02-26-2009, 05:27 AM
royUK Re: Adding 7 days to a date... 02-26-2009, 05:52 AM
ninjao Re: Adding 7 days to a date... 02-26-2009, 06:24 AM
royUK Re: Adding 7 days to a date... 02-26-2009, 06:31 AM
ninjao Re: Adding 7 days to a date... 02-26-2009, 06:40 AM
royUK Re: Adding 7 days to a date... 02-26-2009, 07:21 AM
ninjao Re: Adding 7 days to a date... 02-26-2009, 08:51 AM
royUK Re: Adding 7 days to a date... 02-26-2009, 10:03 AM
ninjao Re: Adding 7 days to a date... 02-26-2009, 10:24 AM
royUK Re: Adding 7 days to a date... 02-26-2009, 11:43 AM
ninjao Re: Adding 7 days to a date... 02-26-2009, 12:17 PM
squiggler47 Re: Adding 7 days to a date... 02-26-2009, 01:01 PM
ninjao Re: Adding 7 days to a date... 02-27-2009, 06:11 AM
squiggler47 Re: Adding 7 days to a date... 02-27-2009, 06:56 AM
  1. #1
    Registered User
    Join Date
    02-25-2009
    Location
    Germany
    MS-Off Ver
    Excel 2000
    Posts
    12

    Adding 7 days to a date using macro

    Hi!

    It would be really great if you could help me with my macro that I am trying to create for my spreadsheet.

    Basically it's to make my content management easier.

    I have made a button and assigned a macro to it. At the moment the button creates a new column and makes it the right size etc.

    Sub new_week()
    '
    ' new_week Makro
    ' Makro am 25.02.2009 von  rs aufgezeichnet
    '
    
    '
        Columns("B:B").Select
        Selection.Insert Shift:=xlToRight
        Selection.ColumnWidth = 10.71
        Range("C21:C30").Select
        Selection.Copy
        Range("B21").Select
        ActiveSheet.Paste
        Range("B21").Select
        Application.CutCopyMode = False
        Selection.ClearContents
        Range("B22").Select
        Selection.ClearContents
        Range("B23").Select
        Selection.ClearContents
        Range("B24").Select
        Selection.ClearContents
        Selection.ClearContents
        Range("B25").Select
        Selection.ClearContents
        Range("B26").Select
        Selection.ClearContents
        Range("B27").Select
        Selection.ClearContents
        Range("B28").Select
        Selection.ClearContents
        Range("A15").Select
        ActiveCell.FormulaR1C1 = "New week added!"
        Range("A13").Select
    End Sub
    However what I really want is for the newly created cell to take the date from the cell next to it and add 7 days to it. For example: 04.01.-10.01. (is the original date) and 11.01.-18.01. (would be the new date)

    Any kind of workaround(other way of formatting the date) or new logical process you have for doing what I want would be really great!

    P.S im using Excel 2000 (German version)

    Thanks in advance!

    -Ninjao
    Last edited by ninjao; 02-27-2009 at 07:33 AM.

Thread Information

Users Browsing this Thread

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

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