How to find the closest colour within in given RGB-range

caymane

New Member
Joined
Mar 20, 2021
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi

I would like to find the closest NCS-colour (column D) with matches the exact values given in I2:K2. If there isn't any colour with the correct RGB-values I'd like to find the closest given the max. deviation in H3. This would give me ranges for each colour channel.

I have no clue where to start with. Any help is highly appreciated.

BR
 

Attachments

  • excel.jpg
    excel.jpg
    135.8 KB · Views: 107

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Welcome to the Forum!

Exact match: =FILTER(D2:D30,MMULT(--(A2:C30=I2:K2),{1;1;1})=3)
Within +/-2: =FILTER(D2:D30,MMULT(--(ABS(A2:C30-I2:K2)<=H3),{1;1;1})=3)
 
Upvote 0
Welcome to the Forum!

Exact match: =FILTER(D2:D30,MMULT(--(A2:C30=I2:K2),{1;1;1})=3)
Within +/-2: =FILTER(D2:D30,MMULT(--(ABS(A2:C30-I2:K2)<=H3),{1;1;1})=3)
Thanks

what if I wanted to find the closest value at all? No deviation given.
MIN....something. I don't know how to combine this with the MMULT(--....

BR
 
Upvote 0
Try: =FILTER(D2:D30,MMULT(--(ABS(A2:C30-I2:K2)),{1;1;1})=MIN(MMULT(--(ABS(A2:C30-I2:K2)),{1;1;1})))
 
Upvote 0
(y) cheers mate!

Added a TRANSPOSE to it and that did the job to remove #SPILL-errors! Have to do some checking if the results are correct.
 
Upvote 0

Forum statistics

Threads
1,214,813
Messages
6,121,706
Members
449,049
Latest member
THMarana

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