PDA

View Full Version : Copy cell from named sheet and paste



menor59
03-14-2013, 10:10 AM
How could i Copy from a Sheet Called 'BLANK' cell P42 and paste it to all sheets Cell P42 excluding Blank??

dazwm
03-14-2013, 11:33 AM
How many sheets, what are they called?

Teeroy
03-14-2013, 01:29 PM
How could i Copy from a Sheet Called 'BLANK' cell P42 and paste it to all sheets Cell P42 excluding Blank??
I'm assuming you mean the value in the cell so you can use:

Sub Replicate_Cell_to_All_Sheets()
Dim sht As Worksheet, content
content = Sheets("Blank").Range("P42").Value
For Each sht In Sheets
If sht.Name <> "Blank" Then
sht.Range("P42").Value = content
End If
Next
End Sub
If however there is a formula in 'BLANK' cell P42 that you want to replicate (which will then calculate on each sheet) replace .Value with .Formula in both locations.

menor59
03-14-2013, 03:50 PM
Worked like a CHARM!!