SOLVED

Excel

%3CLINGO-SUB%20id%3D%22lingo-sub-335053%22%20slang%3D%22en-US%22%3EExcel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-335053%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%26nbsp%3Bone%20column%20(A)%26nbsp%3Bwith%20nameIDs%26nbsp%3Band%20one%20column%20with%20sales%20(B).%20Most%20of%20the%20nameIDs%26nbsp%3Bare%20repeating%20and%20there%20are%20many%20nameIDs.%3C%2FP%3E%3CP%3E1.%20Is%20there%20a%20function%20that%20can%20find%20the%20total%20highest%20sales%20(F4)%2C%20the%20second%20highest%20and%20so%20on%20%3F%3C%2FP%3E%3CP%3E2.%20Is%20there%20a%20function%20that%20then%20can%20find%20%26nbsp%3Bthe%20nameID%20of%20the%20the%20total%20highest%20sales%20(E4)%2C%20the%20second%20highest%20and%20so%20on%3F%3C%2FP%3E%3CP%3E3.%20or%20an%20efficient%20way%20to%20do%26nbsp%3Bthis%26nbsp%3Bin%20excel%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20attached%20an%20example.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMany%20thanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-335053%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-353023%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-353023%22%20slang%3D%22en-US%22%3E%3CP%3Ethanks%20a%20lot%2C%20again!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-353004%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-353004%22%20slang%3D%22en-US%22%3EI%20learned%20array%20formulas%20from%20this%20book%3A%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fwww.mrexcel.com%2Fstore%2Findex.php%3Fl%3Dproduct_detail%26amp%3Bp%3D263%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.mrexcel.com%2Fstore%2Findex.php%3Fl%3Dproduct_detail%26amp%3Bp%3D263%3C%2FA%3E%3CBR%20%2F%3EIf%20you%20need%20my%20help%2C%20please%20don't%20hesitate%20to%20ask%20me.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-352998%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-352998%22%20slang%3D%22en-US%22%3E%3CP%3Earray%20formula%20total%20new%20for%20me%2C%20hehee.....%3C%2FP%3E%3CP%3EI%20will%20do%20some%20understanding%20and%20then%20see%20if%20I%20can%20manage%20re-use%20your%20functions%20(which%20is%20totally%20brilliant).%3C%2FP%3E%3CP%3EAfter%20I%26nbsp%3Bmanage%20this%26nbsp%3Bstep%2C%20I%20have%20a%20third%20column%20which%20is%20year%20(so%20I%20want%20to%20sort%20the%20largest%20by%20a%20specific%20year)%2C%20I%20cannot%20even%20think%20how%20complicated%20that%20will%20be%20(%20probably%20very%20easy%20for%20you%2C%20you%20just%20click%20here%20and%20click%20there%20-%20wish%20I%20was%20there%20at%20this%20level).%20I%20probably%20need%20to%20ask%20you%20for%20more%20help.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-352972%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-352972%22%20slang%3D%22en-US%22%3EHello%20Caroline%2C%3CBR%20%2F%3ETotSales%20refers%20to%20this%20named%20array%20formula%3A%3CBR%20%2F%3E%3DSUMIF(NameID%2CNameID%2CSales)%3CBR%20%2F%3EThe%20formula%20returns%20an%20array%20of%20Total%20Sales%20for%20each%20NameID.%20To%20avoid%20the%20use%20of%20Helper%20Columns%2C%20it%20is%20used%20as%20part%20of%20the%20lookup_vector%20argument%20in%20the%20formulas%20for%20Top%206%20Sales%20and%20Top%206%20NameIDs%2C%20and%20as%20the%20result_vector%20argument%20of%20the%20formulas%20for%20Top%206%20Sales.%3CBR%20%2F%3EStated%20differently%2C%20TotSales%20is%20the%20equivalent%20of%20the%202%20Helper%20Columns%20you%20wanted%20to%20avoid.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-352965%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-352965%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20again%3C%2FP%3E%3CP%3EI%20have%20tried%20to%20use%20your%20solution%2Ffunction(s)%2C%20but%20it%20only%20gives%20me%200%2C%20as%20I%20do%20not%20understand%20the%20totsales%20part%2C%20could%20you%20be%20kind%20to%26nbsp%3Bexplain%20me%20the%20steps%20in%20detail%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-352380%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-352380%22%20slang%3D%22en-US%22%3EYou%20don't%20need%20to%20be%20embarrassed.%20It%20was%20my%20pleasure%20to%20help%20you!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-352379%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-352379%22%20slang%3D%22en-US%22%3E%3CP%3Eyou%20are%20of%20course%20right!%26nbsp%3B%20I%20am%20so%20embarrassed%2C%20was%20in%20the%20read%20only%20view.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-343758%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-343758%22%20slang%3D%22en-US%22%3EAs%20indicated%20earlier%2C%20the%20named%20ranges%20are%20dynamic%20and%20so%20is%20the%20named%20formula.%20Inevitably%2C%20the%20top%206%20results%20automatically%20update%20as%20new%20data%20are%20added%20or%20old%20data%20are%20deleted.%20Prove%20it!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-343042%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-343042%22%20slang%3D%22en-US%22%3E%3CP%3Eis%20it%20possible%20to%20make%26nbsp%3Bthe%20top%206%20automatically%20updated%20with%20total%20sales%20and%20its%20name%26nbsp%3Bwhen%20data%20changes%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-342107%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-342107%22%20slang%3D%22en-US%22%3E%3CP%3Ewow!%3C%2FP%3E%3CP%3Ethis%20is%20exactly%20what%20I%20am%20looking%20for%2C%20you%20are%20GREAT!%20thanks%20again!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-341764%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-341764%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20xucaroline%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBy%20all%20means%2C%20your%20request%20is%20instantly%20granted!%20See%20it%20here%20in%20the%20attached%20file.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheers!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETwifoo%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-341573%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-341573%22%20slang%3D%22en-US%22%3E%3CP%3EMany%20thanks%20for%20taking%20time%20to%20look%20at%20it.%3C%2FP%3E%3CP%3EI%26nbsp%3Bam%20hoping%20for%26nbsp%3Ba%20solution%20that%20solves%20directly%20from%20the%202%20columns%2C%20without%26nbsp%3Bto%26nbsp%3Bsort%20data%20or%26nbsp%3Bhelper%20column%20or%20pivot.....%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-341443%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-341443%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20xucaroline%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20may%20add%20Helper%20Columns%20C%20and%20D%2C%20which%20I%20labeled%20as%20DistinctID%20and%20TotalSales%2C%20respectively%2C%20in%20the%20attached%20file.%20The%20formulas%20in%20Column%20C%20sort%20the%20distinct%20NameIDs%20in%20Column%20A%20while%20those%20in%20Column%20D%20calculate%20the%20Total%20Sales%20for%20each%20distinct%20ID.%26nbsp%3B%3C%2FP%3E%3CP%3EThen%2C%20the%20formulas%20in%20Column%20F%20return%20the%20top%206%20amounts%20of%20Total%20Sales%20while%20those%20in%20Column%20E%20return%20the%20corresponding%20NameID%20for%20each%20amount%20of%20Total%20Sales.%26nbsp%3B%3C%2FP%3E%3CP%3ENote%20that%20the%20named%20ranges%20are%20dynamic%20and%20no%20volatile%20functions%20were%20used%20in%20the%20formulas%20to%20expedite%20the%20calculation%20process.%26nbsp%3B%3C%2FP%3E%3CP%3ECheers!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETwifoo%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-340027%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-340027%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPerhaps%20it's%20possible%2C%20but%20VBA%20is%20not%20my%20expertise.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-338335%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-338335%22%20slang%3D%22en-US%22%3E%3CP%3EMany%20thanks!%3C%2FP%3E%3CP%3EI%20was%20hoping%20to%20avoid%20pivot%20as%20it%20needs%20to%20refresh%20every%20time%20my%20data%20changes.%3C%2FP%3E%3CP%3EWill%20it%20be%20possible%20to%20do%20via%20visual%20basic%3F%3C%2FP%3E%3CP%3EStill%2C%20many%20thanks%20for%20taking%20time%20to%20reply%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-335164%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-335164%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20may%20pivot%20your%20table%20and%20filer%20it%20on%20top%206%2C%20please%20see%20attached.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-808157%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-808157%22%20slang%3D%22en-US%22%3Ehi%20hi%20again%20I%20am%20adding%20one%20more%20criteria%2C%20and%20wonder%20if%20this%20is%20feasible%20at%20all.%20In%20column%20D%20I%20have%20EndDate%20(date%20that%20the%20contract%20is%20ending)%2C%20still%20same%20a%20previous%20ad%20before%20with%20multiple%20ContractID%20in%20column%20A.%201.%20I%20would%20like%20to%20have%20a%20solution%20that%20automatically%20generates%20top%206%20ContractID%20name%20and%20value%20ending%20the%20coming%20next%2012%20month%20listed%20from%20the%20largest.%20If%20this%20is%20not%20feasible%202.%20I%20would%20like%20to%20use%20column%20C%2C%20EndYear.%20Will%20it%20be%20ok%20to%20have%20it%20to%20the%20right%20of%20the%20Value%2Fcolumn%20B%20or%20does%20it%20have%20to%20be%20on%20the%20left%20side%20of%20Value%2Fcolumn%20B%3F%20Although%20I%20figured%20out%20your%20last%20solution%2C%20it%20is%20still%20a%20little%20complicated%20with%20that%20many%20functions.%20I%20guess%20I%20need%20to%20use%20Formulas-%20name%20manger%20to%20do%20the%20necessary%20calculations%20instead%20of%20the%20helper%20columns%20first.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-809280%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-809280%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F282531%22%20target%3D%22_blank%22%3E%40xucaroline%3C%2FA%3E%2C%26nbsp%3B%3C%2FP%3E%3CP%3EAfter%20%3CSTRONG%3E6%3C%2FSTRONG%3Emonths%20and%20%3CSTRONG%3E4%3C%2FSTRONG%3Edays%2C%20I'm%20delighted%20to%20hear%20from%20you%20again.%20In%20answer%20to%20your%20questions%2C%20it%20is%20feasible%20to%20automatically%20generate%20the%20top%206%20values%20for%20the%20next%2012%20months%20and%20their%20corresponding%20Contract%20IDs%2C%20thereby%20rendering%20the%20EndYear%20column%20superfluous.%20In%20the%20attached%20file%2C%20the%20formula%20in%20I4%2C%20to%20return%20the%20top%20%3CSTRONG%3E6%3C%2FSTRONG%3Evalues%20for%20the%20next%2012%20months%2C%20is%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3DAGGREGATE(14%2C4%2C%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EContractIDValues*(COUNTIF(I%243%3AI3%2CContractIDValues)%3D0)%2C%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EROW()-3)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EConversely%2C%20the%20formula%20in%20H4%2C%20to%20return%20the%20Contract%20ID%20for%20each%20value%2C%20is%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3DLOOKUP(2%2C%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3E1%2F(ContractIDValues%3DI4)%2C%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EContractIDs)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3ENote%20that%20foregoing%20formulas%20use%20%3CSTRONG%3E4%3C%2FSTRONG%3Edefined%20names%2C%20as%20listed%20starting%20in%20H13.%26nbsp%3B%3C%2FP%3E%3CP%3ECheers%2C%26nbsp%3B%3C%2FP%3E%3CP%3ETwifoo%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-810360%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-810360%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F280482%22%20target%3D%22_blank%22%3E%40Twifoo%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20so%20happy%20to%20receive%20answer%20from%20you%2C%20and%20in%20that%20super%20fast%20speed%2C%20thank%20you%20so%20much%20for%20taking%20time%20to%20help%20me.%20I%20will%20look%20into%20and%20try%20to%20understand%20the%20answer.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%20regards%3C%2FP%3E%3CP%3ECaroline%3C%2FP%3E%3C%2FLINGO-BODY%3E
xucaroline
Occasional Contributor

 

I have one column (A) with nameIDs and one column with sales (B). Most of the nameIDs are repeating and there are many nameIDs.

1. Is there a function that can find the total highest sales (F4), the second highest and so on ?

2. Is there a function that then can find  the nameID of the the total highest sales (E4), the second highest and so on?

3. or an efficient way to do this in excel?

 

I have attached an example.

 

Many thanks!

19 Replies

You may pivot your table and filer it on top 6, please see attached.

Many thanks!

I was hoping to avoid pivot as it needs to refresh every time my data changes.

Will it be possible to do via visual basic?

Still, many thanks for taking time to reply :)

 

Hi,

 

Perhaps it's possible, but VBA is not my expertise.

Hello xucaroline,

 

You may add Helper Columns C and D, which I labeled as DistinctID and TotalSales, respectively, in the attached file. The formulas in Column C sort the distinct NameIDs in Column A while those in Column D calculate the Total Sales for each distinct ID. 

Then, the formulas in Column F return the top 6 amounts of Total Sales while those in Column E return the corresponding NameID for each amount of Total Sales. 

Note that the named ranges are dynamic and no volatile functions were used in the formulas to expedite the calculation process. 

Cheers!

 

Twifoo

 

Many thanks for taking time to look at it.

I am hoping for a solution that solves directly from the 2 columns, without to sort data or helper column or pivot.....

Solution

Hello xucaroline,

 

By all means, your request is instantly granted! See it here in the attached file. 

 

Cheers!

 

Twifoo

wow!

this is exactly what I am looking for, you are GREAT! thanks again!

 

is it possible to make the top 6 automatically updated with total sales and its name when data changes?

As indicated earlier, the named ranges are dynamic and so is the named formula. Inevitably, the top 6 results automatically update as new data are added or old data are deleted. Prove it!

you are of course right!  I am so embarrassed, was in the read only view.

 

You don't need to be embarrassed. It was my pleasure to help you!

Hi again

I have tried to use your solution/function(s), but it only gives me 0, as I do not understand the totsales part, could you be kind to explain me the steps in detail?

Hello Caroline,
TotSales refers to this named array formula:
=SUMIF(NameID,NameID,Sales)
The formula returns an array of Total Sales for each NameID. To avoid the use of Helper Columns, it is used as part of the lookup_vector argument in the formulas for Top 6 Sales and Top 6 NameIDs, and as the result_vector argument of the formulas for Top 6 Sales.
Stated differently, TotSales is the equivalent of the 2 Helper Columns you wanted to avoid.

array formula total new for me, hehee.....

I will do some understanding and then see if I can manage re-use your functions (which is totally brilliant).

After I manage this step, I have a third column which is year (so I want to sort the largest by a specific year), I cannot even think how complicated that will be ( probably very easy for you, you just click here and click there - wish I was there at this level). I probably need to ask you for more help.

I learned array formulas from this book:
https://www.mrexcel.com/store/index.php?l=product_detail&p=263
If you need my help, please don't hesitate to ask me.

thanks a lot, again!

hi hi again I am adding one more criteria, and wonder if this is feasible at all. In column D I have EndDate (date that the contract is ending), still same a previous ad before with multiple ContractID in column A. 1. I would like to have a solution that automatically generates top 6 ContractID name and value ending the coming next 12 month listed from the largest. If this is not feasible 2. I would like to use column C, EndYear. Will it be ok to have it to the right of the Value/column B or does it have to be on the left side of Value/column B? Although I figured out your last solution, it is still a little complicated with that many functions. I guess I need to use Formulas- name manger to do the necessary calculations instead of the helper columns first.

Hello @xucaroline

After 6 months and 4 days, I'm delighted to hear from you again. In answer to your questions, it is feasible to automatically generate the top 6 values for the next 12 months and their corresponding Contract IDs, thereby rendering the EndYear column superfluous. In the attached file, the formula in I4, to return the top 6 values for the next 12 months, is: 

=AGGREGATE(14,4,
ContractIDValues*(COUNTIF(I$3:I3,ContractIDValues)=0),
ROW()-3)

Conversely, the formula in H4, to return the Contract ID for each value, is: 

=LOOKUP(2,
1/(ContractIDValues=I4),
ContractIDs)

Note that foregoing formulas use 4 defined names, as listed starting in H13. 

Cheers, 

Twifoo

Hi@Twifoo 

 

I am so happy to receive answer from you, and in that super fast speed, thank you so much for taking time to help me. I will look into and try to understand the answer. 

 

Best regards

Caroline

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
22 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies