Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 557
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can change range to select active rows instead of :=Range("S10 ldiaz Excel Discussion (Misc queries) 7 August 29th 08 03:52 PM
How can I change range name definitions as the No. of rows change. [email protected] Excel Programming 1 June 20th 06 03:40 AM
How do I change a range name back to the underlying data range? Colin Excel Worksheet Functions 1 September 26th 05 05:55 PM
How can I dynamically change the range for Range("A1:M500")? Bij Excel Programming 3 August 25th 05 02:00 AM
Change cell colour for a cell or range within a predefined range Martin[_21_] Excel Programming 2 May 23rd 05 06:16 PM


All times are GMT +1. The time now is 02:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"