Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
HOW TO CHANGE RANGE
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can change range to select active rows instead of :=Range("S10 | Excel Discussion (Misc queries) | |||
How can I change range name definitions as the No. of rows change. | Excel Programming | |||
How do I change a range name back to the underlying data range? | Excel Worksheet Functions | |||
How can I dynamically change the range for Range("A1:M500")? | Excel Programming | |||
Change cell colour for a cell or range within a predefined range | Excel Programming |