Unique not removing duplicate values

Resod2

New Member
Joined
Aug 3, 2021
Messages
3
Office Version
  1. 365
Platform
  1. Windows
In Google Sheets, I have a table in which the headers should be all the unique start and end times that are in another table. However, when I use the Unique function, the result still contains duplicates. Does anyone know why this might be the case?

Excel Formula:
=TRANSPOSE(SORT(FILTER(UNIQUE(FLATTEN(B3:B,E3:E)),UNIQUE(FLATTEN(B3:B,E3:E))<>""),1,1))

1643225909583.png


As you can see there are two 04:00 and two 05:00s in the result.

Here's the link to a dummy spreadsheet with the problem: Generic Sheet

Any help would be greatly appreciated.
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Hi Resod2,
the main issue is a decimal calculation... What you see as 05:00 is in fact a decimal value: 5/24=0,041666666666666...*5. Computers are not the best calculating with decimals, so if, like in your case, you're removing the extra day in column E, the decimal part screws up a bit. Try e.g. =H2-I2 and set that cell to a decimal value, you'll see there is some minor decimal difference. The way to solve this is e.g. like so:
cell E3: =ARRAYFORMULA(IF(D3:D="","",ROUND(24*IF(D3:D>1,D3:D-1,D3:D))/24))
->basically: multiply by 24, round to a whole value and divide by 24.
Cheers,
Koen
 
Upvote 0

Forum statistics

Threads
1,223,979
Messages
6,175,761
Members
452,668
Latest member
mrider123

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