Need help with INDEX/MATCH with three columns

Margooox

New Member
Joined
Jul 19, 2021
Messages
27
Office Version
  1. 365
Platform
  1. Windows
Hello everyone!

It's my first time posting here and I,m an Excel newbie and am learning on my own, so please bear with me!

I have a database of colors with their names and RGB values spread throughout three columns.

1626711057066.png

I also have a system in a different tab that mixes colors together and outputs new RGB values.

Now, using the INDEX/MATCH formulas, I want to take my custom RGB values and find the name of the closest match from my database by comparing the RGB values.

I have found this formula online which would do exactly what I need. I've tried using it but it returns an error and I'm not quite sure how to work with it.

1626711504371.png

Here's the formula that I have which doesn't work:
1626711600505.png


Are there better formulas to do this? How would you go about this?

Thank you in advance to anyone who will try to help me!
 

Attachments

  • 1626710964083.png
    1626710964083.png
    4.8 KB · Views: 10

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Welcome to the MrExcel forum!

Maybe:

Book1
CDEFGHIJ
1NameHexRedGreenBluePastel Red
2Snow#FFFAFA255250250
3Baby Pink#F4C2C2244194194
4Pastel Red#FF696125510597
5Indian Red#FF5C5C2559292
ColorListNew
Cell Formulas
RangeFormula
J1J1=INDEX(SORT(CHOOSE({1,2},ColorListNew!C2:C10,(ColorListNew!F2:F10-ColorProfile!G4)^2+(ColorListNew!G2:G10-ColorProfile!H4)^2+(ColorListNew!G2:G10-ColorProfile!I4)^2),2,1),1,1)
 
Upvote 0
Here's a more succinct way to write that formula:

Excel Formula:
=INDEX(SORT(CHOOSE({1,2},ColorListNew!C2:C10,MMULT((ColorListNew!F2:H10-ColorProfile!G4:I4)^2,{1;1;1})),2,1),1,1)
 
Upvote 0
Solution
Happy to help! Thanks for the feedback. ?

(And just for my own amusement, a still shorter way:

Excel Formula:
=INDEX(SORTBY(ColorListNew!C2:C10,MMULT((ColorListNew!F2:H10-ColorProfile!G4:I4)^2,{1;1;1})),1)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
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