Multi sheet data import

balthur

New Member
Joined
Mar 2, 2011
Messages
2
I've got a 2003 xls file with 300 sheets,
in sheet number 301 (named summary) I've got the lit of the 300 sheets.

I need to get inside every sheet and import data from C3 and put it into a list right next to the sheet name in sheet 301 in an another column.

big thanks for help guys :)
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Try this

Code:
Public Sub CopyFromSheets()
    Sheets("Sumary").Activate
    For i = 1 To Sheets.Count
        If Sheets(i).Name <> "Sumary" Then 
            ActiveSheet.Cells(i, 3).Value = Sheets(i).Range("C3").Value
        End If
    Next i
End Sub
 
Upvote 0
Welcome to the MrExcel board!

You could just use a formula. This would have the advantage of automatically updating if any of the C3 cell values change.

If your first sheet name is in cell A2 of the summary sheet then in cell B2 try this formula and copy it down.

=INDIRECT("'"&A2&"'!C3")
 
Upvote 0
Try this

Code:
Public Sub CopyFromSheets()
    Sheets("Sumary").Activate
    For i = 1 To Sheets.Count
        If Sheets(i).Name <> "Sumary" Then 
            ActiveSheet.Cells(i, 3).Value = Sheets(i).Range("C3").Value
        End If
    Next i
End Sub

looks cool, but how would I use it in an another spreadsheet ?
so how to copy cells from all sheets from an another spreadsheet ? :P
 
Upvote 0
What you mean by spreadsheet - are all the sheets in one workbook or multiple workbook?
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,275
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top