multiple worksheet look up if value on a line is >0 to return result on separate worksheet

Mattl1976

New Member
Joined
Jan 31, 2016
Messages
4
I am trying to create a summary page (bill of materials) for items that need to be ordered taking the information from multiple worksheets. Basically if the qty column in any of the worksheets is >0 then we need to populate with the information on the bill of materials page (supplier, part number, description and qty) the last two columns would be check boxes.

Not sure how to drop in the excel sheet to this thread but i basically want to look up say column E from sheet A or sheet B or Sheet C etc and if the value in column E is >0 then input into the values on that line from column B column C column D and Column E into a separate worksheet.

I hope this makes sense??

I would like to think that most things can be done in excel but I have hit a stumbling block on this one.

Anyone out there able to help?
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Hello Mattl1976,

See if the following works for you:-


Code:
Sub Test()

        Dim ws As Worksheet, sh As Worksheet
        Set sh = Sheets("Summary") '----> Change sheet name to suit.

Application.ScreenUpdating = False

sh.UsedRange.Offset(1).Clear

For Each ws In Worksheets
        If ws.Name <> "Summary" Then  'Change sheet name to suit.

With ws.[A1].CurrentRegion
             .AutoFilter 5, ">" & 0
             .Offset(1).Columns("B:E").Copy
             sh.Range("A" & Rows.Count).End(3)(2).PasteSpecial xlValues
             .AutoFilter
             End With
       End If
Next ws

Application.CutCopyMode = False
Application.ScreenUpdating = True

End Sub

The code filters Column E in each sheet (except the Summary sheet) for any value greater than zero and then transfers the relevant rows of data, from Column B to Column E only, to the Summary sheet.
The Summary sheet is refreshed each time the code is run.

I hope that this helps.

Cheerio,
vcoolio.
 
Upvote 0

Forum statistics

Threads
1,215,368
Messages
6,124,521
Members
449,169
Latest member
mm424

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