Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel Macros - Grid Converted to Vertical Listing
I have a file (Cash Wksht) which has the dates along the left hand side and
the name of each account along the top. The values are entered in their respective locations on the grid. I am looking to develop a listing in a separate spreadsheet (Daily Values)which would have column A - Date, column B - Amount and column C - Name. I have been able to copy the date multiple times but have been mostly unsuccessful with the rest of the data. Attached is the macros I have developed: Sub Macro2() ' Macro recorded 3/21/2006 by Jason Heider ' Dim i As Integer ' Setup Initial Cell Position Sheets("Daily Values").Select Range("A8").Select Do 'Paste Dates Sheets("Cash Wksht").Select Range("A10:A40").Select Selection.Copy Sheets("Daily Values").Select ActiveSheet.Paste Application.CutCopyMode = False ActiveCell.Offset(rowOffset:=0, columnOffset:=1).Activate Sheets("Cash Wksht").Select ' Paste Values Range("B10:B40").Select ActiveCell.Offset(rowOffset:=0, columnOffset:=i).Activate ' ActiveCell.Offset(30, 0).Select Selection.Copy Sheets("Daily Values").Select ActiveSheet.Paste Application.CutCopyMode = False ActiveCell.Offset(rowOffset:=0, columnOffset:=1).Activate Sheets("Cash Wksht").Select ' Paste Item Name Range("B9").Select ActiveCell.Offset(rowOffset:=0, columnOffset:=i).Activate Selection.Copy Sheets("Daily Values").Select ActiveSheet.Paste Application.CutCopyMode = False ' Move To End of Last Pasted Group Range("A8").Select Selection.End(xlDown).Select ActiveCell.Offset(rowOffset:=1, columnOffset:=0).Activate ' Index of 20 Columns i = i + 1 Loop Until i 20 End Sub Please let me know if you can be of assistance. Thanks again. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2003 Workbooks with macros (.xls) converted to Excel 2007 | Excel Discussion (Misc queries) | |||
insert vertical grid line that is linkedto a certain data element | Charts and Charting in Excel | |||
Why do vertical grid lines disappear in Excel? | Excel Discussion (Misc queries) | |||
A macros for listing information | Excel Programming | |||
listing macros associated with shortcut keys | Excel Programming |