convert my current formula into a dynamic array formula

ED38

New Member
Joined
Mar 29, 2024
Messages
28
Office Version
  1. 365
Platform
  1. Windows
Hello,

I would need your help to convert my current formula into a dynamic array formula (formula in column AE)
My formula works but it would be much more convenient if it were an array formula as i plan to use it in a large data base...
thanks for your help.

I am combining the product code and the tier because when using the product code only, because when the several occurences of the same date, the next ranks (n+1, +2, +3...) are skipped and then not found by the formula but if you have other ideas, I am open!

2024-11-18 COGS Recency Report connect to DB.xlsx
AAABACADAEAFAG
1ProductTierValueUpdated DateValid up toNext updated dateProduct-Tier rank
2A211024/01/2320/09/2420/09/244
3B176908/11/2430/01/2530/01/251
4C217713/08/2326/09/2326/09/232
5B290508/11/2430/01/2530/01/251
6A268509/01/25
7C111122/10/22
8B212023/03/24
9A139630/04/23
10B187803/09/23
11C26427/09/23
12A238421/09/24
13A21006/10/24
14C110804/12/24
15B12301/08/23
16C118619/12/22
17B176901/09/24
Sheet1
Cell Formulas
RangeFormula
AG1AG1=AA1&"-"&AB1&" rank"
AE2:AE5AE2=IFERROR(LARGE(IF($AA$2:$AA$17&$AB$2:$AB$17=$AA2&$AB2,$AD$2:$AD$17),SUMPRODUCT(($AA$2:$AA$17&$AB2:$AB17=$AA2&$AB2)*($AD2<$AD$2:$AD$17))),TODAY())-1
AF2:AF5AF2=IFERROR(LARGE(IF($AA$2:$AA$17&$AB$2:$AB$17=$AA2&$AB2,$AD$2:$AD$17),AG2-1),TODAY())-1
AG2:AG5AG2=SUMPRODUCT(($AA$2:$AA$17&$AB2:$AB17=$AA2&$AB2)*($AD2<$AD$2:$AD$17))+1
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Try it.
Excel Formula:
=LET(
    _Prodcut_Tier, $AA$2:$AA$17 & $AB$2:$AB$17,
    _Updated_Date, $AD$2:$AD$17,
    _Result, MAP(
        _Prodcut_Tier,
        _Updated_Date,
        LAMBDA(a, b,
            IFERROR(
                LARGE(
                    IF(_Prodcut_Tier = a, _Updated_Date),
                    SUMPRODUCT((_Prodcut_Tier = a) * (b < _Updated_Date))
                ),
                TODAY()
            ) - 1
        )
    ),
    _Result
)
 
Upvote 0
Solution

Forum statistics

Threads
1,226,114
Messages
6,189,051
Members
453,522
Latest member
Seeker2025

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