How to search a specific column based on another cell?

ivanbin

New Member
Joined
Apr 22, 2019
Messages
2
So here I have a table which shows which months have 4 of a specific week day and which have 5.
I am doing this because for my work I work with people who get X amount of hours of service per month. So for example if someone gets 12 hours of service per month and gets it for 3 hours every Saturday, they will go over their 12 hours if the month has 5 Saturdays. So I need to know how often that happens (and preferably on which months if thats possible).
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Welcome to mr Excel forum

Maybe something like this

A
B
C
D
E
F
G
H
1
Month​
Monday​
Tuesday​
Wednesday​
Thursday​
Friday​
Saturday​
Sunday​
2
January​
4​
5​
5​
5​
4​
4​
4​
3
February​
4​
4​
4​
4​
4​
4​
4​
4
March​
4​
4​
4​
4​
5​
5​
5​
5
April​
5​
5​
4​
4​
4​
4​
4​
6
May​
4​
4​
5​
5​
5​
4​
4​
7
June​
4​
4​
4​
4​
4​
5​
5​
8
July​
5​
5​
5​
4​
4​
4​
4​
9
August​
4​
4​
4​
5​
5​
5​
4​
10
September​
5​
4​
4​
4​
4​
4​
5​
11
October​
4​
5​
5​
5​
4​
4​
4​
12
November​
4​
4​
4​
4​
5​
5​
4​
13
December​
5​
5​
4​
4​
4​
4​
5​
14
15
Count > 4​
4​
5​
4​
4​
4​
4​
4​
16
List​
List​
List​
List​
List​
List​
List​
17
April​
January​
January​
January​
March​
March​
March​
18
July​
April​
May​
May​
May​
June​
June​
19
September​
July​
July​
August​
August​
August​
September​
20
December​
October​
October​
October​
November​
November​
December​
21
December​
22

<tbody>
</tbody>


Formula in B15 copied across
=COUNTIF(B2:B13,">4")

Array formula in B17 copied across and down (gray area)
=IF(ROWS(B$17:B17)>B$15,"",INDEX($A$2:$A$13,SMALL(IF(B$2:B$13>4,ROW($A$2:$A$13)-ROW($A$2)+1),ROWS(B$17:B17))))
confirmed with Ctrl+Shift+Enter, not just Enter

Hope this helps

M.
 
Upvote 0

Forum statistics

Threads
1,215,960
Messages
6,127,942
Members
449,411
Latest member
sdescharme

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