Hi everyone,
I have been trying to figure out a code that would highlight the two closest values of a range selection. What I mean by this is the two closest values (.9999 and .9998 for example) anywhere in a given range and be the two numbers must be adjacent in the range.
I am very new to VBA and I am having a hard time. I was wondering if anyone knew how to do this?
Thank you in advance for your help.
The idea is to find the 2 closest values in the whole table and highlight them. They can be far appart.
I have been trying to figure out a code that would highlight the two closest values of a range selection. What I mean by this is the two closest values (.9999 and .9998 for example) anywhere in a given range and be the two numbers must be adjacent in the range.
I am very new to VBA and I am having a hard time. I was wondering if anyone knew how to do this?
Thank you in advance for your help.
The idea is to find the 2 closest values in the whole table and highlight them. They can be far appart.
Last edited by a moderator: