Countifs formula on Criteria

Lukma

Active Member
Joined
Feb 12, 2020
Messages
259
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Hi Friends

Please am Having slit trouble with the a Formula P8
i need to Count Column Q based on three Criteria
what am Trying to get is That i need to Count Column Q and with the Criteria list month Column O5, Rigs&Barges Column O6, and then last Criteria in Column if greater of equal O7 then it should count Column Q12

i hope i could get a solution to this formula

ILSP Offshore Vessel Tracking Time Spent-2022.xlsx
KLMNOPQ
5May
6Rigs&Barges
770%
8Count
9
10
11MonthVoyageLocationDeck %Jackup ComplexActual Time SpentExceed KPI
12May1179Rig SMS Mariam10%Rigs&Barges0:25 
13May1179Rig Al Lulu90%Rigs&Barges23:453:45
14May1179Rig MuhaiyimatRigs&Barges0:20 
15May1180Rig Muhaiyimat70%Rigs&Barges13:00 
16May1180Rig Al Lulu20%Rigs&Barges2:05 
17May1180Barge Shammal10%Rigs&Barges0:30 
18May1181Al Ghallan IslandDrl-Island10:000:00
19May1181Rig SMS Faith0%Rigs&Barges0:05 
20May1181Rig Al Yasat90%Rigs&Barges26:506:50
21May1182Rig SMS Esse40%Rigs&Barges19:455:45
22May1182Rig Yemillah10%Rigs&Barges1:45 
23May1182Rig Al Hudiariyat30%Rigs&Barges4:50 
24May1183Rig SMS Faith95%Rigs&Barges34:4014:40
25May1183Al Ghallan IslandDrl-Island7:24 
26May1183Rig Al BzoomRigs&Barges0:35 
27May1183Rig Al IttihadRigs&Barges0:57 
28May1183Rig Ariabahatt-1Rigs&Barges4:22 
29May1184Rig Al ReemRigs&Barges42:4022:40
30May1184Al Qatia IslandDrl-Island0:30 
31May1185Zirku Island100%Prd-Island4:40 
32May1185Ettouk IslandDrl-Island1:35 
33May1185Allianz Power 3:10 
34May1185Bu Sikeen IslandDrl-Island0:35 
35May1186Rig Al Yasat60%Rigs&Barges16:102:10
36May1186Rig Al Bzoom10%Rigs&Barges2:30 
37May1186Rig SMS Faith30%Rigs&Barges14:000:00
38May1187Bu Sikeen Island20%Drl-Island45:0535:05
39May1187Al Qatia Island70%Drl-Island10:580:58
ILSP_Offshore_Vessel_Tracking
Cell Formulas
RangeFormula
K12:N1211K12=UNIQUE(CHOOSE({1,2,3,4},B12:B1864,C12:C1864,E12:E1864,F12:F1864))
O12:O39O12=IFERROR(VLOOKUP(M12,Location,2,0),"")
P12:P39P12=IFERROR(1/(1/SUMIFS(Vessel_Tracking[Total Time],Vessel_Tracking[Location],M12,Vessel_Tracking[Voyage],L12)),"")
Q12:Q39Q12=IF(AND(N12>=$C$4,O12=$A$4,P12>$C$10),P12-$C$10,IF(AND(N12<=$C$5,O12=$A$5,P12>$D$10),P12-$D$10,IF(AND(O12="",O12=$A$4,P12>$D$10),P12-$D$10,IF(AND(O12=$A$6,P12>$E$10),P12-$E$10,IF(AND(O12=$A$7,P12>$F$10),P12-$F$10,IF(AND(O12=$A$8,P12>$F$10),P12-$F$10,""))))))
Dynamic array formulas.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Are the values in column B actual dates, or just month names? If they are dates, are they scattered throughout a month, or are they the first of the month like O5 is?
 
Upvote 0
HI Rorya

Thanks for you feedback please here is the my data i have tried some formula which am not still sure if am getting it alright

Column D4 i need to Count Column Q based on Criteria
Colum E4 need to sum Column Q based on Criteria
Column F4 i need to Fine average Column Q based on Criteria but am unable to get the formula yet for that

Appreciate your support to look into my formula
Thanks

ILSP Offshore Vessel Tracking Time Spent-2022.xlsx
ABCDEFGHIJKLMNOPQ
3ILSPKPINo's of VisitTotal HoursAverage hrs.
4Rigs&BargesJackRigs70%13332:4625:35
5Rigs&BargesJackRigs69%28220:437:52
6ComplexComplex12Hrs1287:087:15
7Drl-IslandDrl-Island10 Hrs1268:115:40
8Prd-IslandPrd-Island10 Hrs43:000:45
9June70%69%
10ILSP KPI20141210
11MonthVoyageVessel LocationDeck Load %Location Start Date & Time Location End Date & Time Total TimeMonthVoyageLocationDeck %Jackup ComplexActual Time SpentExceed KPI
12April1044Z-QUEENABK Complex80%27/04/22 07:1027/04/22 08:020:52April1044ABK Complex80%Complex26:4614:46
13April1044Z-QUEENABK Complex80%27/04/22 09:4027/04/22 09:480:08May1044ABK Complex80%Complex26:4614:46
14April1044Z-QUEENABK Complex80%28/04/22 07:1028/04/22 07:520:42May1044Mutawa-202 0:15 
15April1044Z-QUEENABK Complex80%28/04/22 08:1528/04/22 08:230:08April1045Rig Vivekanand-3100%Rigs&Barges63:0043:00
16May1044Z-QUEENABK Complex80%01/05/22 06:5001/05/22 07:070:17April1045Rig YemillahRigs&Barges12:10 
17May1044Z-QUEENABK Complex80%01/05/22 08:2502/05/22 08:3324:08April1046Nasr ComplexComplex10:15 
18May1044Z-QUEENMutawa-20201/05/22 14:3001/05/22 14:450:15April1046Barge Pepper20%Prd-Barge2:30 
19May1044Z-QUEENABK Complex80%02/05/22 08:5502/05/22 09:140:19April1047Al Qatia Island50%Drl-Island2:34 
20May1044Z-QUEENABK Complex80%02/05/22 10:4002/05/22 10:520:12April1047Bu Sikeen Island20%Drl-Island0:33 
21April1045QMS MARIMBARig Vivekanand-3100%27/04/22 15:3027/04/22 20:104:40April1048Al Ghallan Island10%Drl-Island0:20 
22April1045QMS MARIMBARig Yemillah27/04/22 22:2028/04/22 10:3012:10April1048Umm Al Anbar30%Drl-Island10:500:50
23April1045QMS MARIMBARig Vivekanand-3100%28/04/22 12:0030/04/22 22:2058:20April1048Asseifiya Island10%Drl-Island5:30 
24April1046ADNOC-810Nasr Complex27/04/22 08:0027/04/22 18:1510:15April1048Ettouk Island60%Drl-Island8:35 
25April1046ADNOC-810Barge Pepper20%27/04/22 21:3028/04/22 00:002:30April1049Rig JunanaRigs&Barges0:05 
26April1047LCT-WARDEHAl Qatia Island50%28/04/22 02:0028/04/22 02:400:40April1049Rig SMS EsseRigs&Barges19:15 
27April1047LCT-WARDEHAl Qatia Island50%28/04/22 03:0028/04/22 04:481:48April1049Rig Yemillah40%Rigs&Barges6:10 
28April1047LCT-WARDEHBu Sikeen Island20%28/04/22 06:3628/04/22 06:540:18April1050Rig Butinah10%Rigs&Barges4:37 
29April1047LCT-WARDEHBu Sikeen Island20%28/04/22 08:3028/04/22 08:450:15April1050Rig Al Shuweihat20%Rigs&Barges7:40 
30April1047LCT-WARDEHAl Qatia Island50%28/04/22 10:2428/04/22 10:300:06May1050Al Ghallan Island60%Drl-Island4:35 
31April1048ADNOC-224Al Ghallan Island10%27/04/22 08:1027/04/22 08:300:20May1050Rig Butinah10%Rigs&Barges4:37 
32April1048ADNOC-224Umm Al Anbar30%27/04/22 10:5527/04/22 21:4510:50May1050Rig JunanaRigs&Barges6:10 
33April1048ADNOC-224Asseifiya Island10%28/04/22 01:4528/04/22 07:155:30April1051Zirku Island60%Prd-Island8:10 
34April1048ADNOC-224Ettouk Island60%28/04/22 09:5028/04/22 18:258:35April1051Barge Pili-Pili40%Prd-Barge3:20 
35April1049AMS-RUBYRig Junana27/04/22 19:4527/04/22 19:500:05April1052Das Island  8:44 
ILSP_Offshore_Vessel_Tracking
Cell Formulas
RangeFormula
D4D4=COUNTIFS($Q$12:$Q$900000,">0:0",$O$12:$O$900000,$A$5,$K$12:$K$900000,$B$9,$N$12:$N$900000,">=70%")
E4E4=SUMIFS($Q$12:$Q$900000,$O$12:$O$900000,$A$4,$K$12:$K$900000,$B$9, $N$12:$N$900000,">=70%")
F4:F8F4=E4/D4
D5D5=COUNTIFS($Q$12:$Q$900000,">0:0",$O$12:$O$900000,$A$5,$K$12:$K$900000,$B$9,$N$12:$N$900000,"<=69%")
E5E5=SUMIFS($Q$12:$Q$900000,$O$12:$O$900000,$A$4,$K$12:$K$900000,$B$9, $N$12:$N$900000,"<=69%")
D6D6=COUNTIFS($O$12:$O$900000,$B$6,$K$12:$K$900000,$B$9,$Q$12:$Q$900000,">0")
E6E6=SUMIFS($Q$12:$Q$900000,$O$12:$O$900000,$B$6,$K$12:$K$900000,$B$9)
D7D7=COUNTIFS($O$12:$O$900000,$B$7,$K$12:$K$900000,$B$9,$Q$12:$Q$900000,">0")
E7E7=SUMIFS($Q$12:$Q$900000,$O$12:$O$900000,$B$7,$K$12:$K$900000,$B$9)
D8D8=COUNTIFS($O$12:$O$900000,$B$8,$K$12:$K$900000,$B$9,$Q$12:$Q$900000,">0")
E8E8=SUMIFS($Q$12:$Q$900000,$O$12:$O$900000,$B$8,$K$12:$K$900000,$B$9)
K12:N1626K12=UNIQUE(CHOOSE({1,2,3,4},B12:B2410,C12:C2410,E12:E2410,F12:F2410))
O12:O35O12=IFERROR(VLOOKUP(M12,Location,2,0),"")
P12:P35P12=IFERROR(1/(1/SUMIFS(Vessel_Tracking[Total Time],Vessel_Tracking[Location],M12,Vessel_Tracking[Voyage],L12)),"")
Q12:Q35Q12=IF(AND(N12>=$C$4,O12=$A$4,P12>$C$10),P12-$C$10,IF(AND(N12<=$C$5,O12=$A$5,P12>$D$10),P12-$D$10,IF(AND(O12="",O12=$A$4,P12>$D$10),P12-$D$10,IF(AND(O12=$A$6,P12>$E$10),P12-$E$10,IF(AND(O12=$A$7,P12>$F$10),P12-$F$10,IF(AND(O12=$A$8,P12>$F$10),P12-$F$10,""))))))
B12:B35B12=IFERROR(EOMONTH([@[Location Start Date & Time ]],-1)+1,"")
I12:I35I12=IFERROR(1/(1/SUM([@[Location End Date & Time ]]-[@[Location Start Date & Time ]])),"")
Dynamic array formulas.
Cells with Data Validation
CellAllowCriteria
B9List=Info_Setting!$K$3:$K$15
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,182
Members
452,615
Latest member
bogeys2birdies

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