![]() |
Retrieve data from different sheets
How do I get datas from ALL of the worksheet within the file into a "master worksheet". REMEMBER ALL WORKSHEETS In the master worksheet: Column A = worksheet name (example "Sheet 1") Column B = get data in cell B1 from each worksheet Column C = get data in cell B2 from each worksheet Column D = get data in cell B3 from each worksheet Column E = get data in cell K20 from each worksheet Column F = get data in cell C26 from each worksheet -- dannyboy213 ------------------------------------------------------------------------ dannyboy213's Profile: http://www.excelforum.com/member.php...o&userid=31032 View this thread: http://www.excelforum.com/showthread...hreadid=525395 |
Retrieve data from different sheets
See your other thread
-- Regards Ron de Bruin http://www.rondebruin.nl "dannyboy213" wrote in message ... How do I get datas from ALL of the worksheet within the file into a "master worksheet". REMEMBER ALL WORKSHEETS In the master worksheet: Column A = worksheet name (example "Sheet 1") Column B = get data in cell B1 from each worksheet Column C = get data in cell B2 from each worksheet Column D = get data in cell B3 from each worksheet Column E = get data in cell K20 from each worksheet Column F = get data in cell C26 from each worksheet -- dannyboy213 ------------------------------------------------------------------------ dannyboy213's Profile: http://www.excelforum.com/member.php...o&userid=31032 View this thread: http://www.excelforum.com/showthread...hreadid=525395 |
Retrieve data from different sheets
Public Sub LoadFromWorksheets()
Dim Wks As Worksheet Dim iRow As Integer iRow = 1 For Each Wks In Application.ActiveWorkbook.Worksheets If Wks.Name < "Master" Then Sheet1.Cells(iRow, 1).Value = Wks.Name Sheet1.Cells(iRow, 2).Value = Wks.Cells(1, 2).Value Sheet1.Cells(iRow, 3).Value = Wks.Cells(2, 2).Value Sheet1.Cells(iRow, 4).Value = Wks.Cells(3, 2).Value Sheet1.Cells(iRow, 5).Value = Wks.Cells(20, 11).Value Sheet1.Cells(iRow, 6).Value = Wks.Cells(26, 3).Value iRow = iRow + 1 End If Next End Sub |
All times are GMT +1. The time now is 07:15 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com