Macro For If Function
Why do you need a macro to duplicate the functionality?
Something like this could work:
Sub CheckMatches()
Dim R As Range
Dim cl As Range
Set R = Range("F1:F5")
For Each cl In R.Cells
If cl.Offset(0, -2).Value = cl.Offset(0, -1).Value Then
cl.Value = "Matched"
Else
cl.Value = "Unmatched"
End If
Next cl
End Sub
adjust the range statement to get the F-range you want. You can make
the sub more flexible by passing the range of rows as parameters
Hth
-John Coleman
On Feb 27, 7:41 am, "Akash" wrote:
On Feb 27, 5:13 pm, "John Coleman" wrote:
A spreadsheet formula should work: in F1 (say) enter the formula
=If(D1=E1,"Matched","Unmatched")
and copy it down for as many rows as you need. If this doesn't
suffice, explain what you need in more detail.
Hth
-John Coleman
On Feb 27, 6:53 am, "Akash" wrote:
hi,
I have 6 Columns
A = Number
B = Number
C= Number
D= A x B x C
E= Input Number by user
F = If(D = E) = Matched/Unmatched)
I want a macro the value of Column D = E then it should display
Matched or Unmatched in Column F.
Is it possible.
Thanks in Advance
i require a macro for the same...
is it possible...
Akash- Hide quoted text -
- Show quoted text -
|