Suming a row if if the week number matches

Craig_Moore

Board Regular
Joined
Dec 12, 2018
Messages
64
Office Version
  1. 2019
Platform
  1. Windows
hi all

Im trying to automate counting how many staff are in over a week but haven't go a clue in how to do this

the totals for the days are in row 28 as shown below and im trying to count each column and get the result in to the totals in cells ao9:ao12

any help will be greatly recived

Craig



LABOUR LOG MARCH.xlsx
EFGHIJKLMNOPAKALAMANAOAP
5DATE0102030405060708091011
699999101010101010
7LAST NAME
8MOORE1HOLHOL11Week9
9Hussain1OT-C1111Week10
10MarinovaHOLHOLHOLHOLHOLWeek11
11Abid1OT-BOT-B1111OT-CWeek12
12Patel11111Week13
13Patel11111
14Limbada1OT-COT-C1111OT-COT-C
15Mahmood111SICK1
16Shah11111
17Qureshi11111
18Khan11111
19Soomro11111
20Pervez1OT-BOT-B1111
21Matloob11111OT-C
22Shahzad11111
23Hussain11111
24Ehsan11111
25Afzal1OT-C1111OT-COT-C
26Ali1OT-BOT-B1111OT-COT-C
27Shah111HOLHOL
281900001818171800
MAR
Cell Formulas
RangeFormula
F5F5=A4
G5:P5G5=F5+1
F6:P6F6=ISOWEEKNUM(F5)
E8:E27E8=IFERROR(IF(C8="","",VLOOKUP(C8,Table1,3,0)),"STAFF")
F28:P28F28=SUM(F8:F27)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F8:AJ102Cell Value="OTHER"textNO
F8:AJ102Cell Value="OT-A"textNO
F8:AJ102Cell Value="OT-B"textNO
F8:AJ102Cell Value="OT-C"textNO
F8:AJ102Cell Value="OT-D"textNO
F8:AJ102Cell Valuecontains "SICK"textNO
F8:AJ102Cell Valuecontains "HOL"textNO
Cells with Data Validation
CellAllowCriteria
F8:AJ27List='LOOK UP'!$F$2:$F$34
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Is this what you mean?
Book1
EFGHIJKLMNOPAKALAMANAO
5DATE1234567891011
699999101010101010
7LAST NAME
8 1HOLHOL11Week919
9 1OT-C1111Week1071
10 HOLHOLHOLHOLHOLWeek110
11 1OT-BOT-B1111OT-CWeek120
12 11111Week130
13 11111
14 1OT-COT-C1111OT-COT-C
15 111SICK1
16 11111
17 11111
18 11111
19 11111
20 1OT-BOT-B1111
21 11111OT-C
22 11111
23 11111
24 11111
25 1OT-C1111OT-COT-C
26 1OT-BOT-B1111OT-COT-C
27 111HOLHOL
281900001818171800
Sheet1
Cell Formulas
RangeFormula
G5:P5G5=F5+1
AO8:AO12AO8=SUMIF($F$6:$P$6,AN8,$F$28:$P$28)
E8:E27E8=IFERROR(IF(C8="","",VLOOKUP(C8,Table1,3,0)),"STAFF")
F28:P28F28=SUM(F8:F27)
 
Upvote 0
Solution
hi Kevin

yes that is exactly what i mean,

thank you for this and well done for understanding my poor explanation

Craig
 
Upvote 0

Forum statistics

Threads
1,214,938
Messages
6,122,346
Members
449,080
Latest member
Armadillos

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