Pull some rows from one worksheet and compile into another

Steven975

New Member
Joined
Nov 14, 2019
Messages
20
I'm looking for a way to automatically take anything with the status "Pending" and compile a list of them on a seperate another worksheet. Any help is much appreciated!

Worksheet One (INPUT)
NameAmountStatus
John150,000Approved
Chris350,000Pending
Steven215,000Funded
Shawn320,000Pending
James125,000Funded

Worksheet Two (OUTPUT)
Chris350,000Pending
Shawn320,000Pending
 
My desired outcome:
If the F column contains the word "Mortgage" and the status is "Pending" or "Approved" I want the entire line to move to my summary sheet titled "Pending"

Book1
ABCDEFGHIJ
55DateAccount #NameMember #MainTypeStatusDollar AmountRefinanced AmountNEW FUNDS
562019-12-03999123456Steve123LendingFixed Rate LoanFunded $10,000 $10,000
572019-12-06999123457Steven124LendingPromotional MortgageFunded $150,000 $75,000 $75,000
582019-03-03999123458LendingMortgagePreapproved $150,000  
592019-05-06999123459LendingBroker Mortgagefunded $200,000 $200,000
602019-05-07999123460LendingMortgageapproved $350,000  
612019-07-06999123461LendingMortgagepending $434,000  
62DepositsGICComplete $15,000  
Staff 2
 
Upvote 0

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Any thoughts on this?
Sorry - busy holiday season.

This is quite a change in layout & requirement so try this very different approach. It assumes sheet 'Pending' exists and contains headings.

VBA Code:
Sub Status_Pending_Approved()
  Dim ws As Worksheet, wsP As Worksheet
  Dim lr As Long, nr As Long
  Dim rCrit As Range
  
  Set wsP = Sheets("Pending")
  For Each ws In Worksheets
    If ws.Name <> "Pending" Then
      lr = ws.Range("F" & ws.Rows.Count).End(xlUp).Row
      If lr > 55 Then
        nr = wsP.Range("G" & wsP.Rows.Count).End(xlUp).Row + 1
        Set rCrit = ws.Range("AZ1:AZ2")
        rCrit.Cells(2).Formula = "=AND(F56=""Mortgage"",OR(G56=""Approved"",G56=""pending""))"
        ws.Range("A55:Z" & lr).AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=rCrit, CopyToRange:=wsP.Range("A" & nr), Unique:=False
        wsP.Rows(nr).Delete
        rCrit.ClearContents
      End If
    End If
  Next ws
End Sub


If the F column contains the word "Mortgage"
BTW, this isn't clear as it doesn't say whether column has to contain "Mortgage" and nothing else (like cell F58 in your sample) or whether "Mortgage" anywhere in the cell (like F57 and F59) should also be considered. My code assumes "Mortgage" and nothing else.
 
Upvote 0
Hi Peter, I apologize, I realized I came off sounding like a bit of a jerk on my Dec 28th post. I appreciate your help so much! I'm learning a lot, and thought originally the code would be easier to tweak to suit my purposes, but this unfortunately goes way over my head!

This project has changed a couple times since I last posted, so I thought it would be good to wait till the final layout was a bit more nailed down.

This is the main tracking sheet, where our lenders will input their new loans, deposits, phone calls, etc. There will be three separate workbooks (one for each branch) with separate worksheets for each staff.
Book1
ABCDEFGHIJKLMNOPQRSTUVWX
58DateAccount #NameMember #MainTypeStatusDollar AmountRefinanced AmountNEW FUNDSPrime +BranchPolicy ExceptionNOTESDisbursed ByPossession DateDate FundedTerm LengthBroker NameBroker FeeBroker Date PaidMONTHQuarterInterest Earned
1122019-09-09110690030590Member 11081108CallPendingContacted  KildareSepQ3 
1132019-09-12110690037088Member 897897CallOpportunity ManagerLMTC  KildareSepQ3 
1142019-09-13110690078489Member 850850CallPendingCU determined no contact  KildareSepQ3 
1152019-09-15110690046566Member 10631063CallPendingCU determined no contact  KildareSepQ3 
1162019-09-16110690033357Member 929929CallPendingLMTC  KildareSepQ3 
1172019-09-19110690017271Member 13351335CallPendingLMTC  KildareSepQ3 
1182019-09-20110690046816Member 830830CallPendingMember contacted CU  KildareSepQ3 
1192019-09-22110690026900Member 14351435CallPendingContacted  KildareSepQ3 
1202019-09-25110690059771Member 12341234OutageMSR $15.00 $15.00 KildareSepQ3 
Staff 1


Then in a separate workbook we will have all of our reports generate. This report is called 'Pending' so we know how much money we will need for upcoming mortgages. On the 'Pending' worksheet there is three reports, one for each branch. Branch One (Kildare) starts in A1. Branch Two would start to the right of Branch One.

I'm looking to make something that will go through all three branch workbooks and through each staff's tracking sheet to pull out anything that contains the word 'Mortgage' (including things like 'Broker Mortgage') in Column F, if Column G is 'Approved' or 'Commitment Signed' or 'Pending', when Column L is equal to the branch name on the report page (A1 for Branch One).

My plan is to have a button to update each branch individually. I think that would make the code easier, and allow the different branch managers to update their reports only when they wanted the new numbers.

I don't need every column from the Tracking Sheet, but I imagine it's easier to just pull the entire row, correct? My thought here was to pull the entire row over and have the unnecessary columns hidden.

Book1
ABCDEFGHIJK
1Kildare 2020-02-08
2Report Date:2020-02-089:45:57 PM
3
4Member NameTypeStatusFunding DatePossession DateTotal MortgageRefinancedNew FundsTerm LengthBuilders AdvancesRate
5Member 1Broker MortgagePreapproved $200,000 $200,000
6Member 2Builders MortgageBuilder's - Advancing $484,500 $331,100 $153,400
7Member 3MortgagePreapproved $125,000 $125,000
8Member 4MortgageApproved2020-01-20 $120,000 $120,000
Pending
 
Upvote 0

Forum statistics

Threads
1,215,432
Messages
6,124,856
Members
449,194
Latest member
HellScout

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