Getting rid of duplicates

ARW17

Board Regular
Joined
Oct 31, 2016
Messages
109
I want to present a schedule for someone who works in multiple departments. The output should have each IntervalStart time once and either working or not and if working, which department are they working in.

So I'm using 1/0 for working/not working.

Department 1's schedule
0 0 0 0 1 1 1 1 0 1 1 1 0 0 0 0 0 0 0 0 0
Department 2's schedule
0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0

I want my output to be
T1
T2
T3
T4
T5 Department 1
T6 Department 1
T7 Department 1
T8 Department 1
T9
T10 Department 1
T11 Department 1
T12 Department 1
T13
T14
T15 Department 2
T16 Department 2
T17 Department 2
T18 Department 2
T19
T20
T21
T22

But since I have 2 departments, I'm getting each time period twice.

Advice please:)
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Using a select distinct would probably remove the dupes (which in general should be those with 0 -- if someone is actually working in two departments at the same time, then you would still get two records I guess).
 
Upvote 0

Forum statistics

Threads
1,221,773
Messages
6,161,855
Members
451,724
Latest member
sledparty

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