Thread: MACRO QUESTION
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default MACRO QUESTION

On Error Resume Next
Set sh = Worksheets("Summary")
On Error Goto 0
If sh Is N othing Then
Worksheets.Add.Name = "Summary
End If
Worksheets("Summary").Cells.ClearContents

For Each sh In ActiveWorkbook.Worksheets
If sh.Name < "Summary" Then
i=i+1
Worksheets("Summary").Cells(i,"A").Value = sh.Name
End If
Next sh

--
HTH

Bob Phillips

(replace somewhere in email address with googlemail if mailing direct)

"HELP" wrote in message
...
I have a situation in which a file is sent with many tabs. Every tab has

the
same information just different part numbers ex. So I would like to create

a
macro that would enable me to extract the data from each tab and input

into a
summary tab which the Macro would include. But if I record a macro the tab
names and the number of tabs change with each file. Any suggestions?