macro to compile columns on multiple sheets
Hi there, Does anyone know how to take data from the same place on multiple sheets and compile them onto a single sheet (e.g. column A:A from each sheet, or cell A1 then put all these onto a single sheet in same or different workbook) Thanks SS -- simonsmith ------------------------------------------------------------------------ simonsmith's Profile: http://www.excelforum.com/member.php...o&userid=34235 View this thread: http://www.excelforum.com/showthread...hreadid=540120 |
macro to compile columns on multiple sheets
Simon Try this for starters It will copy column A from every sheet not named Summary and paste it to the next empty column in sheet called Summary. Sub CopyData() Dim wS As Worksheet Dim wsS As Worksheet Dim iCol As Integer Set wsS = Sheets("Summary") For Each wS In Worksheets If wS.Name < wsS.Name Then On Error Resume Next iCol = Cells.Find(what:="*", searchorder:=xlByColumns, _ searchdirection:=xlPrevious).Column On Error GoTo 0 iCol = iCol + 1 wS.Columns("a:a").Copy wsS.Cells(1, iCol) End If Next wS End Sub -- mudraker ------------------------------------------------------------------------ mudraker's Profile: http://www.excelforum.com/member.php...fo&userid=2473 View this thread: http://www.excelforum.com/showthread...hreadid=540120 |
macro to compile columns on multiple sheets
fantastic will try it today Thanks very much Simon:) -- simonsmith ------------------------------------------------------------------------ simonsmith's Profile: http://www.excelforum.com/member.php...o&userid=34235 View this thread: http://www.excelforum.com/showthread...hreadid=540120 |
All times are GMT +1. The time now is 06:44 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com