How would i get this intended output in a cell?

jcbv3

New Member
Joined
Mar 19, 2017
Messages
8
[TABLE="width: 128"]
<colgroup><col width="64" span="2" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl63, width: 64"]8:00[/TD]
[TD="class: xl64, width: 64"]60[/TD]
[/TR]
[TR]
[TD="class: xl63"]8:30[/TD]
[TD="class: xl64"]79[/TD]
[/TR]
[TR]
[TD="class: xl63"]9:00[/TD]
[TD="class: xl64"]79[/TD]
[/TR]
[TR]
[TD="class: xl63"]9:30[/TD]
[TD="class: xl64"]100[/TD]
[/TR]
[TR]
[TD="class: xl63"]10:00[/TD]
[TD="class: xl64"]100[/TD]
[/TR]
[TR]
[TD="class: xl63"]10:30[/TD]
[TD="class: xl64"]50[/TD]
[/TR]
[TR]
[TD="class: xl63"]11:00[/TD]
[TD="class: xl64"]50[/TD]
[/TR]
[TR]
[TD="class: xl63"]11:30[/TD]
[TD="class: xl64"]50[/TD]
[/TR]
[TR]
[TD="class: xl63"]12:00[/TD]
[TD="class: xl64"]100[/TD]
[/TR]
[TR]
[TD="class: xl63"]12:30[/TD]
[TD="class: xl64"]100[/TD]
[/TR]
[TR]
[TD="class: xl63"]13:00[/TD]
[TD="class: xl64"]100[/TD]
[/TR]
[TR]
[TD="class: xl63"]13:30[/TD]
[TD="class: xl64"]50[/TD]
[/TR]
[TR]
[TD="class: xl63"]14:00[/TD]
[TD="class: xl64"]50[/TD]
[/TR]
[TR]
[TD="class: xl63"]14:30[/TD]
[TD="class: xl64"]50[/TD]
[/TR]
[TR]
[TD="class: xl63"]15:00[/TD]
[TD="class: xl64"]100[/TD]
[/TR]
[TR]
[TD="class: xl63"]15:30[/TD]
[TD="class: xl64"]100[/TD]
[/TR]
</tbody>[/TABLE]

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

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
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,224,820
Messages
6,181,162
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