Extract from multiple worksheets

trebor1956

Board Regular
Joined
Jul 2, 2015
Messages
100
Office Version
  1. 2013
Platform
  1. Windows
Hi, I have 5 worksheets (loop 1, loop 2, loop 3, loop 4 and loop 5) with similar info but in differing order. I would like to for instance extract every occurrence (whole line) where column D contains "MCP" from each of the 5 worksheets and put into a new worksheet called MCP listing all occurrences of "MCP". Other than "MCP" there are 4 other definitions (Smoke, Heat, Sounder, I/O) I would like to extract to their own new worksheets.
Below is a copy of the loop 1 w/sheet as an example. I had a go at Hlookup but struggled.

LoopAddressLocationTypeZone
1​
0001​
Main entranceMCP
1​
1​
0002​
Main entranceSmoke
1​
1​
0003​
Entrance doorsI/O
1​
1​
0004​
Family roomSounder
2​
1​
0005​
Family roomSmoke
2​
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Use Power Query
Append all source tables
Create References and Filter for each type
Load each Reference to separate sheets
 
Upvote 0
Thanks, I don't currently have Power Query available so I have asked the IT dept. if its possible to have it. If the answer is no can you think of an alternative method please?
 
Upvote 0
first update your profile about Excel version and OS

second: it's hard to explain how to use Power Query if you know nothing
would be better if you will read
 
Upvote 0
anyway here is basic M code for all 5 source tables
M is a name of Power Query language
Power Query:
let
    Source = Excel.CurrentWorkbook(),
    #"Filtered Rows" = Table.SelectRows(Source, each Text.StartsWith([Name], "Table")),
    #"Expanded Content" = Table.ExpandTableColumn(#"Filtered Rows", "Content", {"Loop", "Address", "Location", "Type", "Zone"}, {"Loop", "Address", "Location", "Type", "Zone"})
in
    #"Expanded Content"
and one for the result (the rest is similar)
Power Query:
let
    Source = Query1,
    #"Filtered Rows" = Table.SelectRows(Source, each ([Type] = "I/O"))
in
    #"Filtered Rows"
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,198
Members
449,072
Latest member
DW Draft

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top