statistical statement for the number of each employee

Mussa

Active Member
Joined
Jul 12, 2021
Messages
261
Office Version
  1. 2019
  2. 2010
hello
I would count containing for each employee based on matching columns with the headers .

orginal data
1.xlsx
ABCDEFGHIJKLMNOPQRSTUVW
2daysdateemployee1employee2bra1bra2bra3bra4sel1sel2sel3sel4mrsrvectr
3sat1bra1sel1mrbra2sel1mremployee1
4sun2bra1sel1mrtrsel1employee2
5mon3bra1sel2mrvecemployee3
6tue4bra2sel3srbra2sel4sremployee4
7wed5vecbra4sel4mremployee5
8thu6bra1sel1mrtremployee6
9fri7trbra3sel2sremployee7
10employee8
s


result
1.xlsx
KLMNOPQRSTUVW
2bra1bra2bra3bra4sel1sel2sel3sel4mrsrvectr
3employee1410031104111
4employee2021121022212
5employee3
6employee4
7employee5
8employee6
9employee7
10employee8
s
 
BTW, it does require your Excel 2019 not Excel 2010
absolutely yes !
Microsoft Excel .xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACAD
1daysdateemployee1employee2bra1bra2bra3bra4sel1sel2sel3sel4mrsrvectrsatsunmontuewedthufri
2sat1bra1sel1mrbra2sel1mremployee1510041105111#VALUE!000000
3sun2bra1sel1mrtrsel1employee20211310222130#VALUE!00000
4mon3bra1sel2mrvecemployee3                   
5tue4bra2sel3srbra2sel4sremployee4                   
6wed5vecbra4sel4mremployee5                   
7thu6bra1sel1mrtremployee6                   
8fri7trbra3sel2sremployee7                   
9sat1bra1sel1mr
10sun2trsel1
11
1
Cell Formulas
RangeFormula
L2:W8L2=IFNA(COUNTIF(INDEX($C$2:$I$10,1,MATCH($K2,$C$1:$I$1,0)):INDEX($C$2:$I$10,ROWS($C$2:$I$10),MATCH($K2,$C$1:$I$1,0)+2),L$1),"")
X2:AD3X2=IF(ISNUMBER(MATCH($K2,$C$1:$G$1,0)),(LEN(SUBSTITUTE(TEXTJOIN("|",0,IF($A$2:$A$10=X$1,IF($C$1:$G$1=$K2,$A$2:$A$10&$D$2:$H$10&$E$2:$I$10,""),"")),X$1&"||",""))-LEN(SUBSTITUTE(SUBSTITUTE(TEXTJOIN("|",0,IF($A$2:$A$10=X$1,IF($C$1:$G$1=$K2,$A$2:$A$10&$D$2:$H$10&$E$2:$I$10,""),"")),X$1&"||",""),X$1,"")))/3,"")
X4:AD8X4=IFNA(--(INDEX($C$2:$I$10,MATCH(X$1,$A$2:$A$10,0),MATCH($K4,$C$1:$I$1,0)+1)&INDEX($C$2:$I$10,MATCH(X$1,$A$2:$A$10,0),MATCH($K4,$C$1:$I$1,0)+2)<>""),"")
 
Last edited:
Upvote 0

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
The formula works for me with that sample data. However, the formula refers to rows 2:10 and you have only shown down to row 8. Could there be any #VALUE! error values in rows 9 or 10?
 
Upvote 0
you see to my picture before last updated
Could there be any #VALUE! error values in rows 9 or 10?
actually I check it , I don't fine any thing . so I decide attach the file maybe find out somthing
cont.xlsx
 
Upvote 0
When I open your file, the formulas in the 'day' columns include lots of "@" symbols. eg For X2

=IF(ISNUMBER(MATCH($K2,$C$1:$G$1,0)),(LEN(SUBSTITUTE(TEXTJOIN("|",0,IF(@$A$2:$A$10=X$1,IF(@$C$1:$G$1=$K2,@$A$2:$A$10&@$D$2:$H$10&@$E$2:$I$10,""),"")),X$1&"||",""))-LEN(SUBSTITUTE(SUBSTITUTE(TEXTJOIN("|",0,IF(@$A$2:$A$10=X$1,IF(@$C$1:$G$1=$K2,@$A$2:$A$10&@$D$2:$H$10&@$E$2:$I$10,""),"")),X$1&"||",""),X$1,"")))/3,"")

Remove them and see how you go.
 
Upvote 0
the formulas in the 'day' columns include lots of "@" symbols.
but why doesn't show me
it doesn't accept the formula and there is a problem in this part IF(@$A$2:$A$10=X$1 and the cursor stay focus @$A$2 .
 
Upvote 0
Try removing them and confirm the formula with Ctrl+Shift+Enter, not just Enter.
 
Upvote 0
truly I no know how show symbol @ for you but not for me !!!:rolleyes:
confirm the formula with Ctrl+Shift+Enter
any way your suggestion works perfectly .
much appreciated for your effort & time :)
 
Upvote 0
Upvote 0

Forum statistics

Threads
1,223,714
Messages
6,174,044
Members
452,542
Latest member
Bricklin

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