View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Andoni Andoni is offline
external usenet poster
 
Posts: 1
Default Copy address from one sheet to other sheets

Sub AAA()
Dim Cell As Range
Dim Sht As Worksheet

Dim Rg As Range
Set Rg = Sheets(1).Range(Range("A1"), Range("A65536").End(xlUp))
For Each Cell In Rg
For Each Sht In ThisWorkbook.Sheets
If Cell.Value = Sht.Name Then
With Sht
.Visible = True
.Activate
.Rows(1).Insert
.Range("A1").Value = Cell.Offset(0, 1).Value
Exit For
End With
End If
Next Sht
Next Cell
End Sub