Dim m As Double, n As Integer, p As Double
m = WorksheetFunction.Min(Range("a1"), Range("B1"))
n = WorksheetFunction.Match(m, Range("a1:B1"), 0)
p = WorksheetFunction.Max(Range("A1"), Range("B1"))
Cells(1, n) = p
I haven't tried the macro yet but i'm still struggling with it, however, I'm trying to compare the numeric occurance (results) of words in a list (Col C) identified using MS IF function, against the 'Control' list of numeric Instances of words (Col B)
i.e. Col A contains the words and Col B & C are the numeric occurances in both the Control and The Results respectively.
Esentially I think the IF formula would be, something like:
So if the response in C4 is equal to or greater than the control B4, it returns the value of Cell B4
if the response in C4 is less than the 'control' B4, it returns the value of Cell B4
I don't think the IF function can be used to return the actual value of the Cell enclosed in the quote marks " " , which is a shame.
Any suggestions using this approach would be appreciated.