Need Help For Cell_change

sathish_fun

Board Regular
Joined
Feb 15, 2008
Messages
247
Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
<o:p></o:p>
Can any one help me that I need a macro which will run automatically when the cell in row U:U has others (i.e.) <o:p></o:p>
If Target. Address = "$U$:$U$" = Others then<o:p></o:p>
Active cell next should be updated as reactive <o:p></o:p>
<o:p></o:p>
(For Eg)<o:p></o:p>
<o:p></o:p>
If Rang ("U2") = "other" then it should update only in ("v2") as "reactive"<o:p></o:p>
<o:p></o:p>
Kindly help<o:p></o:p>
<o:p></o:p>
Sathishv <?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /><v:shapetype id=_x0000_t75 stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></v:path><o:lock aspectratio="t" v:ext="edit"></o:lock></v:shapetype><v:shape id=_x0000_i1025 style="WIDTH: 12pt; HEIGHT: 15.75pt" alt="0" type="#_x0000_t75"><v:imagedata o:href="http://www.mrexcel.com/forum/images/smilies/confused.gif" src="file:///C:\DOCUME~1\sathishv\LOCALS~1\Temp\msohtml1\01\clip_image001.gif"></v:imagedata></v:shape><o:p></o:p>
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Right click the sheet tab, select View Code and paste in

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 21 And UCase(Target.Value) = "OTHER" Then
    Application.EnableEvents = False
    Target.Offset(0, 1).Value = "Reactive"
    Application.ScreenUpdating = True
End If
End Sub

then close the code window using the X.
 
Upvote 0
Hi,

Maybe something like:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Not Intersect(Target, Columns("U")) Is Nothing Then
    If Target.Value = "Other" Then Target.Offset(0, 1) = "Reactive"
    
End If
End Sub

Right click on the worksheet tab and select View Code and place the code on the sheet's code page.

Hope it helps,

Dom
 
Upvote 0
Hi

On the sheet where you want this to appear, rightlcick on the tab name and select "view code" - paste the following into the VBE that will open up:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim r As Range, cell As Range
Set r = Intersect(Target, Range("U:U"))
If Not r Is Nothing Then
    Application.EnableEvents = False
    For Each cell In r
        If UCase(cell.Value) = "OTHER" Then _
            cell.Offset(, 1).Value = "Reactive"
    Next cell
    Application.EnableEvents = False
End If
End Sub
 
Upvote 0
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
Hi<o:p></o:p>
Sorry in my previous request only for Row U:U But now i need both U:U and V:V Kindly Help<o:p></o:p>
<o:p></o:p>
Can any one help me that I need a macro which will run automatically when the cell in row U:U has others and row V:V = "Good" (i.e.)
If Target. Address = "$U$:$U$" = Others and V:V = "Good" then
Active cell next should be updated as reactive <o:p></o:p>

(For Eg)<o:p></o:p>
If Rang ("U2") = "other" and V:V = "Good" then it should update only in ("w2") as "reactive"<o:p></o:p>
<o:p></o:p>
Kindly help
<o:p></o:p>
Sathishv :confused:<o:p></o:p>
<o:p> </o:p>
 
Upvote 0
Here's some amended code:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim r As Range, cell As Range
Set r = Intersect(Target, Range("U:U"))
If Not r Is Nothing Then
    Application.EnableEvents = False
    For Each cell In r
        If UCase(cell.Value) = "OTHER" And UCase(cell.Offset(, 1).Value) = "GOOD" Then _
            cell.Offset(, 2).Value = "Reactive"
    Next cell
    Application.EnableEvents = False
End If
End Sub
 
Upvote 0
Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
Sorry in my previous request only for Row U:U But now i need both U:U and V:V Kindly Help<o:p></o:p>
<o:p></o:p>
Can any one help me that I need a macro which will run automatically when the cell in row U:U has others and row V:V = "Good" (i.e.)
If Target. Address = "$U$:$U$" = Others and V:V = "Good" then
Active cell next should be updated as reactive <o:p></o:p>

(For Eg)<o:p></o:p>
If Rang ("U2") = "other" and V:V = "Good" then it should update only in ("w2") as "reactive"<o:p></o:p>
<o:p></o:p>
Kindly help
<o:p></o:p>
Sathishv :confused:<o:p></o:p>
 
Upvote 0
Try

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 21 And UCase(Target.Value) = "OTHER" And UCase(Target.Offset(0, 1).Value) = "GOOD" Then
    Application.EnableEvents = False
    Target.Offset(0, 2).Value = "Reactive"
    Application.EnableEvents = True
End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,402
Messages
6,119,299
Members
448,885
Latest member
LokiSonic

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top