replace filter

ajm

Well-known Member
Joined
Feb 5, 2003
Messages
2,065
Office Version
  1. 365
Platform
  1. Windows
i have inherited a report that uses FILTER to transform the raw data input into a meaningful report. The original report used set ranges for each filter formula and these had to be expanded each time new data was added. to get around this, i changed all the ranges to dynamic named ranges (using indirect). the file is ballooning in size each month as its updated. Before FILTER, i would have run formulas adjacent to a pivot table (getting unique data from a list of multiples). This would probably still result in a large file but would it be as large?? any ideas on better method folks?
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
TRIMRANGE is unknown on my version of Excel.
I thought that may be the case, that's why I said..
If you do not already have the TRIMRANGE function you might choose to wait a bit longer before deciding to change
The function is new and is only slowly being released to users. I was suggesting it in case you preferred not to immediately head off in a different direction to try to solve your problem but instead would rather wait. :)
 
Upvote 0
Hi ajm,

Based on my experience, filters and formulas end-up eating your memory in large file. If you use Excel as à huge database, I would recommand thinking about vba. We could take a look if you have some example or dummy data if there is something to do before going towards vba.
ok, so i think VBA might be the best method. the file is so unwieldy.

its a simple report based on an export from our ERP. it identifies instances when purchase orders are created after invoices for products are received. Usual order is Purch Order first, then invoice.

the report, which consists of payment lines, is pasted into a Data tab at E1 (I actually paste only the data without the headers so i don't have to recreate named ranges each time. There are four helper rows in columns A-D but these could be incorporated into the code.

Column A (1st helper) flags line items where the invoice has been presented first. If the days between PO date and Invoice date are negative (Inv Date - PO Date), flag is 1, otherwise 0.
Column B (2nd helper) flags those line items posted against a purchase order (irrespective of when). If Column Y (Purchase Order Nbr) is blank, then "", else 1.
Column C 3rd helper) converts the payment month (from Payment Date) to a number 1 - 12. (i used this to order the columns displaying payments against POs)
Column D isolates the Payment Month.

Book3
ABCDEFGHIJKLMN
1Order After Invoice?Total Orders Month OrderPayment MonthLedger NameAccount NumberAccount DescriptionInvoice DatePayment DatePayment Amount (ex)Payment Amount (inc)Purchase OrderPurchase Order Create DateDays between Order Date and Invoice Date
2118FebAPACT12345Jim30/01/202511/02/20255555234610/02/2025-11
3017JanAPACT12345Bob19/01/202523/01/202542.142.1987616/01/20253
400 AugAPACT56743Randy16/06/202417/08/2024-91.4-91.4
500 JanAPACT89765Jurgen30/01/20256/01/202591.491.4
600 JanAPACT33452Lacy19/01/202525/01/2025-100-100
7016DecAPACT99087Sam30/11/202416/12/202410010093451/11/202429
8118FebAPACT12345Jim27/12/202411/02/20255555234610/02/2025-45
9118FebAPACT12345Jim5/01/202511/02/20255555234610/02/2025-36
10118FebAPACT12345Jim6/01/202511/02/20255555234610/02/2025-35
Sheet1
Cell Formulas
RangeFormula
A2:A10A2=IF(N2<0,1,0)
B2:B10B2=IF(L2="",,1)
C2:C10C2=IF(L2="","",IF(MONTH(I2)<6,MONTH(I2)+6,MONTH(I2)-6))
D2:D10D2=EOMONTH(I2,0)
N2:N3,N7:N10N2=H2-M2

There are two outputs from the data.

Firstly, a unique listing of all Purchase Orders and the monthly spend against each. POs listed down the page and monthly amounts across the page.
Secondly, a unique listing of each Purch Order that was created after its invoice, with monthly spend across the page.
 
Upvote 0

Forum statistics

Threads
1,226,466
Messages
6,191,197
Members
453,646
Latest member
SteenP

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