HELP! Finding SUM, AVERAGE, MIN, MAX formulas for cells that have numbers and text in them

mathkkad

New Member
Joined
Jun 23, 2018
Messages
6
Hi,

Could you please help me finding excel formulas for the following problem?

I have the following cells on the same column (column A, rows 1-5):

A
1 00:30 random1 !day random6
2 01:00 random2 !day
3 02:00 random3 !night
4 01:15 random4 !night random7
5 00:15 random5 !day

Basically all cells contain: an hour (always at the beginning of the cell), random words, a key word (that starts with !)

First for !day

Could you help me SUM all the hours in the cells that have the keyword !day in it in one formula? (without splitting the cell data in multiple cells) Should be 01:45
Could you help me AVERAGE all the hours in the cells that have the keyword !day in it in one formula? (without splitting the cell data in multiple cells) Should be 00:35
Could you help me MIN all the hours in the cells that have the keyword !day in it in one formula? (without splitting the cell data in multiple cells) Should be 00:15
Could you help me MAX all the hours in the cells that have the keyword !day in it in one formula? (without splitting the cell data in multiple cells) Should be 01:00

also do the same for !night

Could you help me SUM all the hours in the cells that have the keyword !night in it in one formula? (without splitting the cell data in multiple cells) Should be 03:15
Could you help me AVERAGE all the hours in the cells that have the keyword !night in it in one formula? (without splitting the cell data in multiple cells) Should be 01:37
Could you help me MIN all the hours in the cells that have the keyword !night in it in one formula? (without splitting the cell data in multiple cells) Should be 01:15
Could you help me MAX all the hours in the cells that have the keyword !night in it in one formula? (without splitting the cell data in multiple cells) Should be 02:00

Thank you very much!
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Excel 2010
A
100:30 random1 !day random6
201:00 random2 !day
302:00 random3 !night
401:15 random4 !night random7
500:15 random5 !day
6
701:45
800:35
900:15
1001:00
11
12
1303:15
1401:37
1501:15
1602:00
Sheet4
Cell Formulas
RangeFormula
A7{=TEXT(SUM(IF(ISNUMBER(SEARCH("!day",$A$1:$A$5)),TIMEVALUE(LEFT($A$1:$A$5,5)))),"hh:mm")}
A8{=TEXT(AVERAGE(IF(ISNUMBER(SEARCH("!day",$A$1:$A$5)),TIMEVALUE(LEFT($A$1:$A$5,5)))),"hh:mm")}
A9{=TEXT(MIN(IF(ISNUMBER(SEARCH("!day",$A$1:$A$5)),TIMEVALUE(LEFT($A$1:$A$5,5)))),"hh:mm")}
A10{=TEXT(MAX(IF(ISNUMBER(SEARCH("!day",$A$1:$A$5)),TIMEVALUE(LEFT($A$1:$A$5,5)))),"hh:mm")}
A13{=TEXT(SUM(IF(ISNUMBER(SEARCH("!night",$A$1:$A$5)),TIMEVALUE(LEFT($A$1:$A$5,5)))),"hh:mm")}
A14{=TEXT(AVERAGE(IF(ISNUMBER(SEARCH("!night",$A$1:$A$5)),TIMEVALUE(LEFT($A$1:$A$5,5)))),"hh:mm")}
A15{=TEXT(MIN(IF(ISNUMBER(SEARCH("!night",$A$1:$A$5)),TIMEVALUE(LEFT($A$1:$A$5,5)))),"hh:mm")}
A16{=TEXT(MAX(IF(ISNUMBER(SEARCH("!night",$A$1:$A$5)),TIMEVALUE(LEFT($A$1:$A$5,5)))),"hh:mm")}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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