Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 Workbooks with macros (.xls) converted to Excel 2007 Barb Reinhardt Excel Discussion (Misc queries) 6 September 1st 07 06:58 AM
insert vertical grid line that is linkedto a certain data element Henk-Jan Charts and Charting in Excel 2 November 11th 06 11:41 PM
Why do vertical grid lines disappear in Excel? rrgttn Excel Discussion (Misc queries) 0 January 18th 06 12:28 AM
A macros for listing information Egzyst Excel Programming 1 January 6th 06 04:19 PM
listing macros associated with shortcut keys windsurferLA[_2_] Excel Programming 1 January 30th 04 05:32 PM


All times are GMT +1. The time now is 02:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"