PC Review


Reply
Thread Tools Rate Thread

HOW TO CHANGE RANGE

 
 
K
Guest
Posts: n/a
 
      17th Dec 2007
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
change colors in a range of excel cells based on another range of cells Bobbi Muck Microsoft Excel Programming 1 9th Apr 2010 03:47 AM
How can change range to select active rows instead of :=Range("S10 ldiaz Microsoft Excel Misc 7 29th Aug 2008 03:52 PM
How can I change range name definitions as the No. of rows change. HSNYDER313@COX.NET Microsoft Excel Programming 1 20th Jun 2006 03:40 AM
How do I change a range name back to the underlying data range? =?Utf-8?B?Q29saW4=?= Microsoft Excel Worksheet Functions 1 26th Sep 2005 05:55 PM
Change cell colour for a cell or range within a predefined range =?Utf-8?B?TWFydGlu?= Microsoft Excel Programming 2 23rd May 2005 06:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:49 AM.