How would i get this intended output in a cell?

jcbv3

New Member
Joined
Mar 19, 2017
Messages
8
8:0060
8:3079
9:0079
9:30100
10:00100
10:3050
11:0050
11:3050
12:00100
12:30100
13:00100
13:3050
14:0050
14:3050
15:00100
15:30100

<colgroup><col width="64" span="2" style="width:48pt"> </colgroup><tbody>
</tbody>

I have these data in 2 columns. I was wondering what formula I could use to have the below as the output:

0800-0930, 1030-1200, 1330-1500

==========

Basically, I would like to group the ones that are below 100.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Let's assume you have the hours in col A, starting from A2 down
The numbers in col B starting down from B2.
To make the formula work and keep it as simple as possible put the number 100 in cell B1.
The data order must not change.

in cell C2 place the following formula:
Code:
=IF(B2<100,IF(B1>=100,C1&IF(ISBLANK(C1),"",",")&TEXT(A2,"hhmm-"),C1),IF(B1<100,C1&TEXT(A2,"hhmm"),C1))

Now fill it down to the end of the data.
 
Upvote 0

Forum statistics

Threads
1,215,102
Messages
6,123,097
Members
449,096
Latest member
provoking

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