ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Lookup for multie tabs (https://www.excelbanter.com/excel-programming/428754-lookup-multie-tabs.html)

pgarcia

Lookup for multie tabs
 
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


joel

Lookup for multie tabs
 
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


"pgarcia" wrote:

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



All times are GMT +1. The time now is 10:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com