Compare cell Values
Solved/Closed
Related:
- Compare cell Values
- Beyond compare - Download - File management
- Conditional formatting if cell contains text - Excel Forum
- Count if cell contains number - Excel Forum
- If cell contains date then return value ✓ - Office Software Forum
- An example of a cell is a blank cell ✓ - Programming Forum
4 responses
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Jul 15, 2009 at 07:45 AM
Jul 15, 2009 at 07:45 AM
try this macro and post feedback
Sub test() 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 End Sub
Hi,
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:
=IF(C4>=B4,"B4")(C4<B4,"C4")
So if the response in C4 is equal to or greater than the control B4, it returns the value of Cell B4
and
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.
Best regards
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:
=IF(C4>=B4,"B4")(C4<B4,"C4")
So if the response in C4 is equal to or greater than the control B4, it returns the value of Cell B4
and
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.
Best regards
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Feb 6, 2010 at 07:01 AM
Feb 6, 2010 at 07:01 AM
your logic is
=IF(C4>=B4,"B4")(C4<B4,"C4")
THIS IS NOT A MS EXCEL FORMULA
for this the formula is
=IF(C4>-B4,B4,C4)
There are only two alternatives
C4>=B4
C4<B4
=IF(C4>=B4,"B4")(C4<B4,"C4")
THIS IS NOT A MS EXCEL FORMULA
for this the formula is
=IF(C4>-B4,B4,C4)
There are only two alternatives
C4>=B4
C4<B4