Calculation with multiple numbers in single cell

TL30N

New Member
Joined
May 16, 2016
Messages
47
Morning everyone,

I have a test for you all.

I have a schedule of activities that people take part in every day.

It is broken up into half an hour slots.

e.g. 08:00 - 0830 people do 1,2,3,4

1,2,3 & 4 being 4 different activities, which equates to 7.5 minutes per activity.

I'm looking for a way to calculate for the whole week how many minutes each activity has spent on it.

It's difficult as the half an hour slots don't all have the same number of activities, but more problematic is that I can't find a way to calculate calculate a cell that has 1,2,3,4,5 in it as 6 minutes of "1", 6 minutes of "2" etc. Please see below




[TABLE="width: 835"]
<colgroup><col><col><col><col><col span="2"></colgroup><tbody>[TR]
[TD]TIME[/TD]
[TD]Monday[/TD]
[TD]Tuesday[/TD]
[TD]Wednesday[/TD]
[TD]Thursday[/TD]
[TD]Friday[/TD]
[/TR]
[TR]
[TD]6.00-6.30[/TD]
[TD]60[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]6.30-7.00[/TD]
[TD]60[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]7.00-7.30[/TD]
[TD]60[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]7.30-8.00[/TD]
[TD]60[/TD]
[TD]1,2,3,4,5,6,18[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]56,57,4,5,6[/TD]
[/TR]
[TR]
[TD]8.00 - 8.30[/TD]
[TD]60[/TD]
[TD]1,2,3,4,5,6,18,21,56[/TD]
[TD]1, 2, 3, 4, 5, 6, 18, 21[/TD]
[TD]1,2,3,4,5,6,18,21[/TD]
[TD]1,2,3,4,5,6,18,21[/TD]
[/TR]
[TR]
[TD]8.30 - 9.00[/TD]
[TD]60[/TD]
[TD]18, 56,57[/TD]
[TD]1, 2, 3, 4, 5, 6, 18[/TD]
[TD]56,57,44[/TD]
[TD]9,21,56,57[/TD]
[/TR]
[TR]
[TD]9.00 - 9.30[/TD]
[TD]60[/TD]
[TD]55[/TD]
[TD]55, 56, 57, 47, 15[/TD]
[TD]44,47[/TD]
[TD]5,6,16,56[/TD]
[/TR]
[TR]
[TD]9.30 - 10.00[/TD]
[TD]60[/TD]
[TD]55[/TD]
[TD]5, 9,15, 57, 55[/TD]
[TD]47,28,27[/TD]
[TD]5,6,16[/TD]
[/TR]
[TR]
[TD]10.00 - 10.30[/TD]
[TD]60[/TD]
[TD]47,28,56,57[/TD]
[TD]5,6,16[/TD]
[TD]47,63[/TD]
[TD]5,6,16[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
With data like this:


Book1
ABCDEF
1TIMEMondayTuesdayWednesdayThursdayFriday
26.00-6.3060
36.30-7.0060
47.00-7.3060
57.30-8.00601,2,3,4,5,6,1856,57,4,5,6
68.00 - 8.30601,2,3,4,5,6,18,21,561, 2, 3, 4, 5, 6, 18, 211,2,3,4,5,6,18,211,2,3,4,5,6,18,21
78.30 - 9.006018, 56,571, 2, 3, 4, 5, 6, 1856,57,449,21,56,57
89.00 - 9.30605555, 56, 57, 47, 1544,475,6,16,56
99.30 - 10.0060555, 9,15, 57, 5547,28,275,6,16
1010.00 - 10.306047,28,56,575,6,1647,635,6,16
Sheet2


Answer:


Book1
AB
12ActivitiesTime(In Minutes)
13123.15
14223.15
15323.15
16429.15
17572.65
18666.65
1970.00
2080.00
21913.50
22100.00
23110.00
24120.00
2560270.00
Sheet2
Cell Formulas
RangeFormula
B13{=SUM(IFERROR(30/IF(ISNUMBER(SEARCH(","&A13&",",","&SUBSTITUTE($B$2:$F$10," ","")&",")),LEN(","&$B$2:$F$10&",")-LEN(SUBSTITUTE($B$2:$F$10,",",""))-1),0))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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