Compare cell Values
Solved/Closed
Related:
- Compare cell Values
- Compare two cell values in excel ✓ - Forum - Excel
- Vba code to compare two cell values in different worksheets ✓ - Forum - Excel
- How to compare two cell values in excel using macro ✓ - Forum - Excel
- How to create multiple workbooks from a list of cell values ✓ - Forum - Excel
- Copy and paste loop in vba based on cell values ✓ - Forum - Excel
4 replies
venkat1926
Jul 15, 2009 at 07:45 AM
- Posts
- 1864
- Registration date
- Sunday June 14, 2009
- Status
- Contributor
- Last seen
- August 7, 2021
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
Feb 6, 2010 at 07:01 AM
- Posts
- 1864
- Registration date
- Sunday June 14, 2009
- Status
- Contributor
- Last seen
- August 7, 2021
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