Sort data list based on formula with interchanging signs (<,>,<=,>=) within the formula

rhogsett

New Member
Joined
Jul 23, 2014
Messages
16
Hello Everyone,

I am working with a large data set and and have a formula for generating a list (starting in D14) based on the highest value of Backlog $ within the set parameters starting in G14. The issue is that the parameters, largely the signs (<,>,<=,>=), are part of the formula, ie. {=IFERROR(LARGE(IF($B$3:$B$9>$I$14,IF($D$3:$D$9<=$I$16,IF($C$3:$C$9>=$I$15,$C$3:$C$3))),ROW(A1)),"-")}
I am hoping there is a way to have the signs in the formula to be replaced by cell references (H16,H17,& H18) so that any sign can be selected to adjust the desired output. Any suggestions on how to achieve this?

ABCDEFGHI
1DATA
2ProjectCreation DateBacklog $% Complete
3A1/15/2017 $1,00090%
4B3/15/2018 $10,00075%
5C4/1/2016 $-100%
6D5/15/2018 $5,00010%
7E2/3/2017 $3,00085%
8F12/25/2017 $15,00075%
9G10/31/2016 $1,00098%
10
11
12
13OUTPUTProjectCreation DateBacklog $% CompleteSEARCH PARAMETERS
141F12/25/2017$15,00075%Creation Date>1/1/2017
152B3/15/2018$10,00075%Backlog $> $2,000.00
163D5/15/2018$5,00010%% Complete<100%
174E2/3/2017$3,00085%
185-- --
196-- --
207-- --

<tbody>
</tbody>


Thank you in advance for your help!

RHOGSETT
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Hello

Code:
' sheet module
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, [h17:h19]) Is Nothing Then
    [d14:d20].FormulaArray = _
    "=IFERROR(LARGE(IF($B$3:$B$9" & [h17] & "$I$14,IF($D$3:$D$9" & [h18] & _
    "=$I$16,IF($C$3:$C$9" & [h19] & "=$I$15,$C$3:$C$3))),ROW(A1)),"" - "")"
End If
End Sub
 
Upvote 0
Hello Everyone,

I am working with a large data set and and have a formula for generating a list (starting in D14) based on the highest value of Backlog $ within the set parameters starting in G14. The issue is that the parameters, largely the signs (<,>,<=,>=), are part of the formula, ie. {=IFERROR(LARGE(IF($B$3:$B$9>$I$14,IF($D$3:$D$9<=$I$16,IF($C$3:$C$9>=$I$15,$C$3:$C$3))),ROW(A1)),"-")}
I am hoping there is a way to have the signs in the formula to be replaced by cell references (H16,H17,& H18) so that any sign can be selected to adjust the desired output. Any suggestions on how to achieve this?

It's possible to achieve this, but with a large data set the performance of the spreadsheet would be poor. I think a macro is the proper solution.

Using formulas - something like


A
B
C
D
E
F
G
H
I
1
DATA​
2
Project​
Creation Date​
Backlog $​
% Complete​
3
A​
01/15/2017​
1000​
90%​
4
B​
03/15/2018​
10000​
75%​
5
C​
04/01/2016​
-​
100%​
6
D​
05/15/2018​
5000​
10%​
7
E​
02/03/2017​
3000​
85%​
8
F​
12/25/2017​
15000​
75%​
9
G​
10/31/2016​
1000​
98%​
10
11
12
13
OUTPUT​
Project​
Creation Date​
Backlog $​
% Complete​
SEARCH PARAMETERS​
14
1​
F​
12/25/2017​
15000​
75%​
Creation Date​
>​
01/01/2017​
15
2​
B​
03/15/2018​
10000​
75%​
Backlog $​
>​
2000​
16
3​
D​
05/15/2018​
5000​
10%​
% Complete​
<​
100%​
17
4​
E​
02/03/2017​
3000​
85%​
18
5​
-​
-​
-​
-​
19
6​
-​
-​
-​
-​
20
7​
-​
-​
-​
-​

<tbody>
</tbody>


Array formula in D14 copied down
=IFERROR(LARGE(IF(COUNTIFS(B$3:B$9,B$3:B$9,B$3:B$9,H$14&I$14),IF(COUNTIFS(C$3:C$9,C$3:C$9,C$3:C$9,H$15&I$15),IF(COUNTIFS(D$3:D$9,D$3:D$9,D$3:D$9,H$16&I$16),C$3:C$9))),A14),"-")
Ctrl+Shift+Enter

Array formula in B14 copied down
=IF(ISNUMBER(D14),INDEX(A$3:A$9,SMALL(IF(C$3:C$9=D14,ROW(C$3:C$9)-ROW(C$3)+1),COUNTIF(D$14:D14,D14))),"-")
Ctrl+Shift+Enter

Then you can use VLOOKUP to get the Creation Date and % Complete of each project.

M.
 
Upvote 0

Forum statistics

Threads
1,214,973
Messages
6,122,534
Members
449,088
Latest member
RandomExceller01

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