Dynamic range for a Mode formula?

JohannesM

New Member
Joined
Jun 3, 2015
Messages
4
Hello,

I Im trying to detirmine what article number that is most frequent in column D ,BUT with the condition that column E (week) is between 14 and 19.

Guessing that I need to implement some IF rule but don`t see how. Please save me from more fruitless hours.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Thanks a bunch, that worked perfectly and I would never had figured it out by myself! And thanks for such a fast reply, I really appreciate it alot!
Can this solution also be used to give the 2:nd most used article number?
I managed it when not using weeks as condition. What I used then was: MODE(D:D) for the most frequent and MODE(IF((D:D="")+(D:D=C44),"", D:D)) for the 2:nd most frequent, were C44 was the cell containing the result of the most frequent.
 
Upvote 0
Thanks a bunch, that worked perfectly and I would never had figured it out by myself! And thanks for such a fast reply, I really appreciate it alot!
Can this solution also be used to give the 2:nd most used article number?
[...]

Row\Col
D​
E​
F​
G​
1​
interval
2​
80​
20​
14​
3​
30​
18​
19​
4​
30​
28​
mode
5​
70​
16​
30​
6​
75​
15​
75​
7​
80​
15​
8​
50​
14​
9​
30​
17​
10​
35​
22​
11​
25​
25​
12​
75​
16​
G5, control+shift+enter, not just enter, and copy down:
Rich (BB code):

=IFERROR(1/(1/MODE(IF(1-ISNUMBER(MATCH($D$2:$D$100,G$4:G4,0)),
    IF($E$2:$E$100>=G$2,IF($E$2:$E$100<=G$3,$D$2:$D$100))))),"")

Note. Referencing whole columns in array-processing formulas like the foregoing is not a good idea for reasons of efficiency.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,981
Messages
6,122,565
Members
449,089
Latest member
Motoracer88

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