Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Consolidating ROWS instead of columns HELP PLSE...:)

Sub ConsolidatRows()

Dim sName As String
Dim sh As Worksheet , sPath as String
Dim dest As Range, bk As Workbook
Dim rng as Range

sPath = "D:\Documents and Settings\dk" _
"\Desktop\Consolidation_AR_test_files\"
sName = Dir(sPath & "*.xls")
Do While sName < ""
Set bk = Workbooks.Open(sPath & sName)
Set sh = bk.Worksheets("Analysis")
Set dest = ThisWorkbook.Worksheets(1).Cells(rows.count,1).end (xlup)(2)
set rng = sh.Range(sh.Cells(1,1),sh.Cells(rows.count,1).End( xlup))
rng.EntireRow.copy
dest.PasteSpecial xlValues
dest.PasteSpecial xlFormats

bk.Close SaveChanges:=False
sName = Dir()
Loop
ActiveSheet.Select
ThisWorkbook.Worksheets(1).Name = "Consol_AR_summary"

end sub

--
Regards,
Tom Ogilvy


"Darin Kramer" wrote:


Thanks Gary!!! :) but I need multiple rows - so rows 1 to 300 need to
be selected....

Regards

Darin




*** Sent via Developersdex http://www.developersdex.com ***

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
Consolidating Columns Aidan Excel Discussion (Misc queries) 4 August 21st 09 12:16 AM
Consolidating Data from Columns into Rows Mike Excel Discussion (Misc queries) 2 July 28th 09 07:17 PM
Consolidating Rows Cow Girl Excel Discussion (Misc queries) 0 July 22nd 09 04:25 PM
consolidating two columns ad Excel Discussion (Misc queries) 1 May 23rd 05 11:11 PM
consolidating two columns Duke Carey Excel Discussion (Misc queries) 0 May 23rd 05 06:11 PM


All times are GMT +1. The time now is 02:28 AM.

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

About Us

"It's about Microsoft Excel"