Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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. 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! 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 -- aposatsk ------------------------------------------------------------------------ aposatsk's Profile: http://www.excelforum.com/member.php...o&userid=36709 View this thread: http://www.excelforum.com/showthread...hreadid=571766 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do I email amacro? | Excel Worksheet Functions | |||
Compiling macro based on cell values | Excel Discussion (Misc queries) | |||
updating a spreadsheet in 1 field w/ out changing values in anoth | Excel Worksheet Functions | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) | |||
Passing selected workbook name and values to a macro | Excel Worksheet Functions |