SOLVED

Formula: Count if the ticket is in particular time, date and channel

%3CLINGO-SUB%20id%3D%22lingo-sub-1449964%22%20slang%3D%22en-US%22%3EFormula%3A%20Count%20if%20the%20ticket%20is%20in%20particular%20time%2C%20date%20and%20channel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1449964%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20need%20a%20count%20formula%20for%20E3%3AE26%20in%20spreadsheet%20called%2C%20'Ticket%20Time.'%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E1.%20In%20spreadsheet%2C%20'Ticket%20Time%2C'%20I%20want%20a%20formula%20in%20E3%3AE26%20which%20will%20count%20how%20many%20tickets%20fall%20within%20specific%20time%20for%20'call'%20e.g.%20ticket%20created%20in%2008%3A11%3A59%20would%20be%20counted%20in%20row%2011.%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20source%20of%20information%20is%20in%20column%20B%20and%20C%20called%20'Created'%20and%20'Time'%2C%20of%20spreadsheet%20'2020%20All%20Tickets'.%20Please%20note%20that%20the%20count%20has%20to%20be%20within%20the%20selected%20dates%20shown%20in%20cell%20B3%3AB4%20of%20spreadsheet%2C%20'Ticket%20Time.'%3C%2FP%3E%3CP%3E2%20.%20'call'%20tickets%20can%20be%20found%26nbsp%3B%3CSPAN%3Ein%20the%20mix%20of%20texts%20in%20Column%20D%20named%20'Tags'%20in%20spreadsheet%20'2020%20all%20tickets'.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screen%20Shot%202563-06-09%20at%2009.22.30.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F197442iB30BA44F741B9297%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Screen%20Shot%202563-06-09%20at%2009.22.30.png%22%20alt%3D%22Ticket%20Time%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ETicket%20Time%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screen%20Shot%202563-06-09%20at%2009.22.47.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F197443i268CC7E47FA021C9%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Screen%20Shot%202563-06-09%20at%2009.22.47.png%22%20alt%3D%222020%20All%20Tickets%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3E2020%20All%20Tickets%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1449964%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1450015%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%3A%20Count%20if%20the%20ticket%20is%20in%20particular%20time%2C%20date%20and%20channel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1450015%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F584048%22%20target%3D%22_blank%22%3E%40little2fern%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20try%20this%20formula%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-css%22%3E%3CCODE%3E%3DCOUNTIFS('2020%20All%20Tickets'!%24B%242%3A%24B%2416199%2C%22%26gt%3B%3D%22%26amp%3B%24B%243%2C%0A'2020%20All%20Tickets'!%24B%242%3A%24B%2416199%2C%22%26lt%3B%3D%22%26amp%3B%24B%244%2C%0A'2020%20All%20Tickets'!%24C%242%3A%24C%2416199%2C%22%26gt%3B%3D%22%26amp%3BK3%2C%0A'2020%20All%20Tickets'!%24C%242%3A%24C%2416199%2C%22%26lt%3B%3D%22%26amp%3BL3)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F197449i5F5AF30F042CF348%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETo%20simplify%20the%20process%2C%20I've%20created%20two%20columns%20(From%2FTo)%20next%20to%20the%20table.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20that%20helps%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1458004%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%3A%20Count%20if%20the%20ticket%20is%20in%20particular%20time%2C%20date%20and%20channel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1458004%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F35679%22%20target%3D%22_blank%22%3E%40Haytham%20Amairah%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHello%20Haytham%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20reply%2C%20however%20the%20formula%20isn't%20exactly%20what%20I%20am%20looking%20for%20yet.%3C%2FP%3E%3CP%3EThe%20formula%20you%20shared%20counts%20how%20many%20tickets%20are%20created%20within%20specific%20time%20and%20date%2C%20but%20has%20no%20ticket%20channel%20type%20added%20to%20the%20formula.%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screen%20Shot%202563-06-12%20at%2009.22.03.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F198295iED1DCA0500ABF690%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Screen%20Shot%202563-06-12%20at%2009.22.03.png%22%20alt%3D%22Screen%20Shot%202563-06-12%20at%2009.22.03.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20want%20to%20count%20different%20ticket%20channel%20(e.g.%20call%2C%20fb%2C%20inapp%2C%20email%20and%20twitter)%20and%20how%20each%20appear%20within%20specific%20time%20and%20date.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EThe%20formula%20will%20show%20how%20many%20tickets%20that%20came%20by%20'call'%20channel%20at%206.00am%20between%20start%20date%20x%20to%20end%20date%20y%20for%20example.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EYou%20can%20find%20the%20ticket%20channel%20type%20in%20the%20mix%20of%20text%20in%202020%20All%20Tickets%2C%20column%20D.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EBest%20regards%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EFern%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1458118%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%3A%20Count%20if%20the%20ticket%20is%20in%20particular%20time%2C%20date%20and%20channel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1458118%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20could%20do%20is%2C%20just%20add%20an%20additional%20column%20as%20%22Ticket%20chanel%22%20(call%2C%20fb%2C%20inapp%2C%20email%2C%20twitter)%2C%20and%20generate%20a%20pivot%20table%20from%20this%20data.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EIf%20you%20need%20help%2C%20can%20you%20can%20contact.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%3C%2FP%3E%3CP%3ESupreeth%3C%2FP%3E%3CP%3Esupreeth.guptha%40gmail.com%3CBR%20%2F%3E7019131376%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1458172%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%3A%20Count%20if%20the%20ticket%20is%20in%20particular%20time%2C%20date%20and%20channel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1458172%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F584048%22%20target%3D%22_blank%22%3E%40little2fern%3C%2FA%3E%26nbsp%3BAdded%20a%20column%20E%20to%20%222020%20All%20Tickets%22%20that%20determines%20the%20channel%20from%20the%20Tags%20in%20D.%20From%20there%2C%20I%20created%20a%20pivot%20table%20in%20PT%20that%20counts%20all%20tickets%20by%20channel%2C%20grouped%20by%20hour.%20Note%20that%20there%20are%20356%20tickets%20for%20which%20there%20seems%20to%20be%20no%20reference%20to%20any%20of%20the%20channels%20you%20mentioned.%3C%2FP%3E%3CP%3ESee%20attached%20file.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEdit%3A%20Forgot%20to%20add%20the%20date%20filter.%20Now%20using%20the%20pivot%20table%20Filter%20field%20where%20you%20select%20the%20dates%20to%20be%20counted.%20Perhaps%20not%20the%20most%20elegant%20solution%2C%20but%20an%20easy%20one.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEdit2%3A%20Added%20an%20alternative%20solution%20using%20an%20intermediate%20step%20to%20FILTER%20the%20tickets%20for%20the%20required%20week%20and%20then%20created%20the%20PT%20on%20the%20filtered%20data.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1460922%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%3A%20Count%20if%20the%20ticket%20is%20in%20particular%20time%2C%20date%20and%20channel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1460922%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F584048%22%20target%3D%22_blank%22%3E%40little2fern%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20Fern%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20go%20with%20the%20solution%20suggested%20by%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E.%3C%2FP%3E%3CP%3EBut%20I%20would%20expand%20my%20suggested%20formula%20the%20handle%20the%20additional%20criteria%20you%20mentioned.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETo%20get%20this%20analysis%20done%2C%20you%20need%20to%20extract%20all%20channels%20you%20need%20from%20Tags%20columns%20in%20a%20separate%20column.%3C%2FP%3E%3CP%3EYou%20can%20do%20that%20with%20this%20formula%20below%20and%20also%20with%20the%20formula%20suggested%20by%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E.%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-css%22%3E%3CCODE%3E%3DIF(SUMPRODUCT(IFERROR(SEARCH(%24H%245%3A%24H%249%2CD2)%2C0))%2CINDEX(%24H%245%3A%24H%249%2CMATCH(TRUE%2CISNUMBER(SEARCH(%24H%245%3A%24H%249%2CD2))%2C0))%2C%22%22)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAfter%20that%2C%20you%20can%20expand%20the%20COUNTIFS%20function%20to%20take%20this%20additional%20column%20into%20account%20as%20follows%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-css%22%3E%3CCODE%3E%3DCOUNTIFS('2020%20All%20Tickets'!%24B%242%3A%24B%2416199%2C%22%26gt%3B%3D%22%26amp%3B%24B%243%2C%0A'2020%20All%20Tickets'!%24B%242%3A%24B%2416199%2C%22%26lt%3B%3D%22%26amp%3B%24B%244%2C%0A'2020%20All%20Tickets'!%24C%242%3A%24C%2416199%2C%22%26gt%3B%3D%22%26amp%3B%24K3%2C%0A'2020%20All%20Tickets'!%24C%242%3A%24C%2416199%2C%22%26lt%3B%3D%22%26amp%3B%24L3%2C%0A'2020%20All%20Tickets'!%24E%242%3A%24E%2416199%2CE%242)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F198567iC4A3516EF1162FC1%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20that%20helps%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor

Hello,

 

I need a count formula for E3:E26 in spreadsheet called, 'Ticket Time.'

 

1. In spreadsheet, 'Ticket Time,' I want a formula in E3:E26 which will count how many tickets fall within specific time for 'call' e.g. ticket created in 08:11:59 would be counted in row 11. 

The source of information is in column B and C called 'Created' and 'Time', of spreadsheet '2020 All Tickets'. Please note that the count has to be within the selected dates shown in cell B3:B4 of spreadsheet, 'Ticket Time.'

2 . 'call' tickets can be found in the mix of texts in Column D named 'Tags' in spreadsheet '2020 all tickets'.

 

Ticket TimeTicket Time2020 All Tickets2020 All Tickets

 

 

5 Replies
Highlighted

@little2fern

 

Hi,

 

Please try this formula:

 

=COUNTIFS('2020 All Tickets'!$B$2:$B$16199,">="&$B$3,
'2020 All Tickets'!$B$2:$B$16199,"<="&$B$4,
'2020 All Tickets'!$C$2:$C$16199,">="&K3,
'2020 All Tickets'!$C$2:$C$16199,"<="&L3)

 

image.png

 

To simplify the process, I've created two columns (From/To) next to the table.

 

Hope that helps

Highlighted

@Haytham Amairah 

 

Hello Haytham,

 

Thank you for your reply, however the formula isn't exactly what I am looking for yet.

The formula you shared counts how many tickets are created within specific time and date, but has no ticket channel type added to the formula.Screen Shot 2563-06-12 at 09.22.03.png

I want to count different ticket channel (e.g. call, fb, inapp, email and twitter) and how each appear within specific time and date. 

The formula will show how many tickets that came by 'call' channel at 6.00am between start date x to end date y for example.

You can find the ticket channel type in the mix of text in 2020 All Tickets, column D. 

 

Best regards,

Fern

Highlighted

Hi

 

What could do is, just add an additional column as "Ticket chanel" (call, fb, inapp, email, twitter), and generate a pivot table from this data.

If you need help, can you can contact.

 

Regards

Supreeth

supreeth.guptha@gmail.com
7019131376

Highlighted

@little2fern Added a column E to "2020 All Tickets" that determines the channel from the Tags in D. From there, I created a pivot table in PT that counts all tickets by channel, grouped by hour. Note that there are 356 tickets for which there seems to be no reference to any of the channels you mentioned.

See attached file.

 

Edit: Forgot to add the date filter. Now using the pivot table Filter field where you select the dates to be counted. Perhaps not the most elegant solution, but an easy one.

 

Edit2: Added an alternative solution using an intermediate step to FILTER the tickets for the required week and then created the PT on the filtered data. 

Highlighted
Best Response confirmed by little2fern (Contributor)
Solution

@little2fern

 

Hi Fern,

 

You can go with the solution suggested by @Riny_van_Eekelen.

But I would expand my suggested formula the handle the additional criteria you mentioned.

 

To get this analysis done, you need to extract all channels you need from Tags columns in a separate column.

You can do that with this formula below and also with the formula suggested by @Riny_van_Eekelen.

=IF(SUMPRODUCT(IFERROR(SEARCH($H$5:$H$9,D2),0)),INDEX($H$5:$H$9,MATCH(TRUE,ISNUMBER(SEARCH($H$5:$H$9,D2)),0)),"")

 

After that, you can expand the COUNTIFS function to take this additional column into account as follows:

=COUNTIFS('2020 All Tickets'!$B$2:$B$16199,">="&$B$3,
'2020 All Tickets'!$B$2:$B$16199,"<="&$B$4,
'2020 All Tickets'!$C$2:$C$16199,">="&$K3,
'2020 All Tickets'!$C$2:$C$16199,"<="&$L3,
'2020 All Tickets'!$E$2:$E$16199,E$2)

image.png

 

Hope that helps