+ Reply to Thread
Results 1 to 1 of 1

Macro is changing values!!!

  1. #1
    Registered User
    Join Date
    07-24-2006
    Posts
    57

    Macro is changing values!!!

    I have a ten column chart with the following format:

    1---------------2----------------3----------------....
    19-Aug---------26-Aug--------02-Sept.......
    25-Aug---------01-Sept--------08-Sept.........

    #####-------$$$$$$------------@@@@-------......
    #####-------$$$$$$------------@@@@-------......
    #####-------$$$$$$------------@@@@-------......
    #####-------$$$$$$------------@@@@-------......

    Now the macro deletes Row 1, copies the values (####) from row 2 to row 1; then, it changes Row1 dates to e.g. 26August to 01Sept, and finally changes column 10 to the last week.

    For example, the new values after the macro should be:

    1---------------2----------------3----------------....
    26-Aug--------02-Sept----------09-Sept---------...
    01-Sept--------08-Sept---------14-Sept---------.....

    $$$$$$$-------@@@@-----------!!!!!!!!!!-------......
    $$$$$$$-------@@@@-----------!!!!!!!!!!-------......
    $$$$$$$-------@@@@-----------!!!!!!!!!!-------......
    $$$$$$$-------@@@@-----------!!!!!!!!!!-------......

    The problem arises when the new values (####) are different. Not only is the new Row 1 different from the old Row 2, but Row 3 and Row 4 are completely random values! So, the format turns out to be:

    1---------------2----------------3----------------....
    26-Aug--------02-Sept----------09-Sept---------...
    01-Sept--------08-Sept---------14-Sept---------.....

    $$$@@$-------@%#@-----------@#$%#-------......
    !!!!!$$$$-------@#$%$-----------!@#$^%-------......
    $@!@!$$-------@%#@-----------^%$!!~!-------......
    !!!!!$$$$-------@%#@-----------&&&&&&&-------......

    Here is the macro:

    Sub Macro1()
    '
    ' Macro1 Macro
    ' Macro recorded 15/05/2006 by Alex
    '

    '
    Range("X9:AD127").Select
    Range("X9:AF127").Select
    Range("AF9").Activate
    Selection.Copy
    Range("W9").Select
    ActiveSheet.Paste
    Range("AF9:AF127").Select
    Selection.ClearContents
    Range("W4").Select
    With Worksheets("Asphalt").Range("w7")
    .Value = .Value + 7
    End With
    End Sub
    Last edited by aposatsk; 08-15-2006 at 01:49 PM.

+ Reply to Thread

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