Using Hlookup to return maximum of several values and return the source formatting

cpollr

New Member
Joined
Sep 2, 2014
Messages
2
Hi guys,

As the title suggests, I'm trying to find a term in another worksheet and return the associated value, (if there are several entries return the highest value), but then also return the cells formatting if it has it. I'm having trouble with the formatting as I believe this can only be done using fairly complex VBA.


I see Jerry Sullivan provided a great answer for vlookup here: http://www.mrexcel.com/forum/excel-...ookup-keep-cell-formatting-2.html#post3644436, however the kicker is, in order to get the maximum value I no longer use hlookup. the formula I'm trying to use is:

=MAX(IF(ISNUMBER(FIND(A3,RawData!$1:$1)),RawData!$5:$5))

Where A3 contains the search term, RawData is the worksheet with the data on that I want to return.

I can't seem to alter Jerrys UDF to fit my formula. Could anyone please help me to get my formula to also return the formatting of its target cell?

Many thanks,

Chris
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Forum statistics

Threads
1,214,943
Messages
6,122,380
Members
449,080
Latest member
Armadillos

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