HOW TO CHANGE RANGE

K

K

Hi, I have data in coloumns K , L and M and in coloumn N I have
formula "=K1&L1&M1" which actually make the group of values of
coloumns K , L and M. Range B25 to D62 they are blank cells but in
Range O25 to O62 I have same formula which I mentioned above but this
time this making group of values of Range B , C and D like the formula
I have in Range O25 to O62 is
"=B25&C25&D25". I want macro that when i enter value in cells B , C
and D and formula in cell O make group of those values by formula i
want the group value in cell O to match with group values in coloumn N
and if they not matching then give message that its not there.
Someone send me the macro but i dont know how to change the ranges to
achive my goal. Please is there anybody can help. (please see macro
below) Thanks...........

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "A:C" '<== change to suit


On Error GoTo ws_exit
Application.EnableEvents = False


If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
If Me.Cells(.Row, "A").Value <> "" And _
Me.Cells(.Row, "B").Value <> "" And _
Me.Cells(.Row, "C").Value <> "" Then
If IsError(Application.Match(Me.Cells(.Row,
"D").Value, Columns(14), 0)) Then
MsgBox "Not matched"
End If
End If
End With
End If


ws_exit:
Application.EnableEvents = True
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top