Countif with data from 2 tables

Natit

Board Regular
Joined
Jan 22, 2012
Messages
58
Office Version
  1. 365
Platform
  1. Windows
Hi,
I'm looking for a function that will give me the results as appear in cells v3:w6.
For example: If Data9 = 3, find to what group it belongs by comparing Workers_num1 to Workers_num2 and get the right group from column O
TIA
Nati
Worker_num1Data2Data3Data4Data5Data6Data7Data8Data9Worker_num2Head2Head3Group
81584603815300020201Group12
84384303843300020202Data9=314
8443130844300020202Data6=3105
8458430845300020202Data6=563
8503130850300020202Data6=846
158831511588300020202
159931601599300020201
171731601717300020201
172954611729300020201
179684601796300020201
180554601805300020201
185631411856300020201
185931501859300020201
1971846131971300020202
198054501980300020201
198254511982300020202
202831612028300020201
206831612068300020201
209154602091300020201
209231502092300020202
210231502102300020202
210484502104300020202
213754602137300020201
214631502146300020201
216631312166300020201
217531512175300020201
222454502224300020201
222531412225300020201
222784412227300020201
223884602238300020201
224084502240300020202
2242545132242300020202
2254846132254300020202
226154612261300020202
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
How about
Fluff.xlsm
ABCDEFGHIJKLMNOPQRS
1Worker_num1Data2Data3Data4Data5Data6Data7Data8Data9Worker_num2Head2Head3Group
281584603815300020201Group12
384384303843300020202Data9=314
48443130844300020202Data6=3105
58458430845300020202Data6=563
68503130850300020202Data6=846
7158831511588300020202
8159931601599300020201
9171731601717300020201
10172954611729300020201
11179684601796300020201
12180554601805300020201
13185631411856300020201
14185931501859300020201
151971846131971300020202
16198054501980300020201
17198254511982300020202
18202831612028300020201
19206831612068300020201
20209154602091300020201
21209231502092300020202
22210231502102300020202
23210484502104300020202
24213754602137300020201
25214631502146300020201
26216631312166300020201
27217531512175300020201
28222454502224300020201
29222531412225300020201
30222784412227300020201
31223884602238300020201
32224084502240300020202
332242545132242300020202
342254846132254300020202
35226154612261300020202
36
Sheet6
Cell Formulas
RangeFormula
R3:S3R3=SUM(COUNTIFS($O:$O,R2,$L:$L,FILTER($A$2:$A$100,$I$2:$I$100=3)))
R4:S4R4=SUM(COUNTIFS($O:$O,R2,$L:$L,FILTER($A$2:$A$100,$F$2:$F$100=3)))
R5:S5R5=SUM(COUNTIFS($O:$O,R2,$L:$L,FILTER($A$2:$A$100,$F$2:$F$100=5)))
R6:S6R6=SUM(COUNTIFS($O:$O,R2,$L:$L,FILTER($A$2:$A$100,$F$2:$F$100=8)))
 
Upvote 0
Solution
This forum never failed me.
After adaptions, works perfect.
Thanks
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

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