Lookup for multie tabs

P

pgarcia

Hello all,
Workbook has multiple tabs (4-25+). All the tabs are setup in the same
format and layout. User will put an X in column N, O or P as a data
indicator. I need to have a tab that will give me information from column G
if N, O or P has an X in the column. I would like to have one tab show me all
the data from the tabs that are in the workbook and be able to add more tabs
if need.

Thanks
 
J

Joel

Creayte a new worksheet called summary. The macro will look at all
worksheets except Summary and copy the data from column G into this worksheet.

Sub Summary()

With Sheets("Summary")
.Cells.clearcontenets
SumRow = 1
End With
For Each Sht In Sheets
If Sht.Name <> "Summary" Then
With Sht
LastRow = .Range("G" & Rows.Count).End(xlUp).Row
For RowCount = 1 To LastRow
If UCase(.Range("N" & RowCount)) = "X" Or _
UCase(.Range("O" & RowCount)) = "X" Or _
UCase(.Range("P" & RowCount)) = "X" Then

Sheets("Summary").Range("A" & SumRow) = _
.Range("G" & RowCount)
SumRow = SumRow + 1
End If
Next RowCount
End With
End If

Next Sht

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top