Formula to Return Name Based on Values and Dates

BrettOlbrys1

Board Regular
Joined
May 1, 2018
Messages
128
Office Version
  1. 365
Platform
  1. Windows
I have this table and the result I am looking to achieve is to reorder the list based on a date and the values (from highest to lowest). For example, if I want to return the top 3 deals from 3/1/21, I should see my result being:

Column EColumn F
Company 96
Company 74
Company 81

I have a formula (in column F) to order the #'s from greatest to least is: LARGE($B$1:$B$10,ROWS(F$4:$F4))

I then want to return the name of the company in column E that matches the result from column F. But the problem I run into is that if I want it to be based on a specific date, such as 3/1/21, it will still return the first value it finds in the list, so I would get Company 3, Company 1, and Company 2.

How do I get the correct company names, based on a specific date (column C), if there are similar qty's?

Company Name (A)# of Widgets (B)Date (C)
Company 141/1/21
Company 211/1/21
Company 361/1/21
Company 442/1/21
Company 512/1/21
Company 662/1/21
Company 743/1/21
Company 813/1/21
Company 963/1/21
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
How about
+Fluff 1.xlsm
ABCDEF
1Company Name (A)# of Widgets (B)Date (C)03/01/2021
2Company 1401/01/2021Company 96
3Company 2101/01/2021Company 74
4Company 3601/01/2021Company 81
5Company 4402/01/2021
6Company 5102/01/2021
7Company 6602/01/2021
8Company 7403/01/2021
9Company 8103/01/2021
10Company 9603/01/2021
11
Main
Cell Formulas
RangeFormula
E2:F4E2=SORT(FILTER(A2:B10,C2:C10=F1),2,-1)
Dynamic array formulas.
 
Upvote 0
Can you explain to me how the formula works because the columns I showed don't represent the full set of data, so I will need to adjust it?
 
Upvote 0
It filters columns A&B based on the values in col C, then sorts the result from high to low based on col B
 
Upvote 0
It filters columns A&B based on the values in col C, then sorts the result from high to low based on col B
Thanks. One other question, if I want to limit the results to only the top 5 values for the specific date, how do I accomplish this?
 
Upvote 0
Could you have less than 5 values for a particular date?
 
Upvote 0
In that case how about
+Fluff 1.xlsm
ABCDEF
1Company Name (A)# of Widgets (B)Date (C)02/01/2021
2Company 1401/01/2021Company 66
3Company 2101/01/2021Company 96
4Company 3601/01/2021Company 44
5Company 4402/01/2021Company 74
6Company 5102/01/2021Company 51
7Company 6602/01/2021
8Company 7402/01/2021
9Company 8102/01/2021
10Company 9602/01/2021
11
Main
Cell Formulas
RangeFormula
E2:F6E2=INDEX(SORT(FILTER(A2:B10,C2:C10=F1),2,-1),SEQUENCE(5),{1,2})
Dynamic array formulas.
 
Upvote 0
In that case how about
+Fluff 1.xlsm
ABCDEF
1Company Name (A)# of Widgets (B)Date (C)02/01/2021
2Company 1401/01/2021Company 66
3Company 2101/01/2021Company 96
4Company 3601/01/2021Company 44
5Company 4402/01/2021Company 74
6Company 5102/01/2021Company 51
7Company 6602/01/2021
8Company 7402/01/2021
9Company 8102/01/2021
10Company 9602/01/2021
11
Main
Cell Formulas
RangeFormula
E2:F6E2=INDEX(SORT(FILTER(A2:B10,C2:C10=F1),2,-1),SEQUENCE(5),{1,2})
Dynamic array formulas.
This works perfectly, thank you!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,756
Messages
6,126,685
Members
449,329
Latest member
tommyarra

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