Taking a value from a cell on each sheet and pasting as list in blank sheet

matthewjapp

Board Regular
Joined
May 14, 2007
Messages
115
Hi there,

Can anybody help with the following..

I have a workbook with about 230 sheets given to me by our finance team.

Sometimes there are more than 230 sheets, sometimes less...one thing is constant however, each of the sheets has a value in A1.

Is there an easy way of coding a macro to (assuming I keep 'Sheet 1' blank from A2:A230 as A1 has the header) to go through the other sheets and paste the value from A1 into the next spare line from A2 onwards until every sheet has been interrogated and I end up with a list (with the header in A1) of the 230 or so values in A1 across the other sheets in the workbook.

Thanks in advance to anyone who can help...

Matthew
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hi,

I'm going to make the following assumptions:

- 'Sheet1' is the very left worksheet tab in the book and that the header value is already in cell A1

Try:

Code:
Sub EatinMePenguin ()
 
Dim i as Long
 
With Application
  .ScreenUpdating = False
  .Calculation = xlCalculationManual
End With
 
For i = 2 to Worksheets.Count
  Sheets("Sheet1").Range("A" & i) = Sheets(i).Range("A1")
Next i
 
With Application
  .ScreenUpdating = False
  .Calculation = xlCalculationAutomatic
End With
 
End Sub
 
Upvote 0
One small typo, I made and forgot to update. In the last five lines of code should be, please change the code to:
Rich (BB code):
With Application
  .ScreenUpdating = True
  .Calculation = xlCalculationAutomatic
End With
 
End Sub
Otherwise, glad it works!
 
Upvote 0

Forum statistics

Threads
1,224,581
Messages
6,179,668
Members
452,936
Latest member
anamikabhargaw

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