Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default worksheet_change problems

What i require is when a member of the team types cancelled into cell
ROW then the colums for that N:T for that row are filled with N/A
have tried the below code but with no joy


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "G:G" Then
Application.EnableEvents = False
If Target.Value = cancelled Then
Range("N:T").Value = NA
Else
Range("N:T").Value = False
End If
Application.EnableEvents = True
End If
End Su

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default worksheet_change problems

Hi
try the following:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Intersect(Target, Me.Range("G:G")) Is Nothing Then Exit Sub
On Error GoTo CleanUp:
With Target
If .Value = "canceled" Then
Application.EnableEvents = False
range(cells(.row,"N"),cells(.row,"T")).value = "N/A"
End If
End With
CleanUp:
Application.EnableEvents = True
End Sub

--
Regards
Frank Kabel
Frankfurt, Germany

What i require is when a member of the team types cancelled into cell
G ROW then the colums for that N:T for that row are filled with N/A I
have tried the below code but with no joy


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "G:G" Then
Application.EnableEvents = False
If Target.Value = cancelled Then
Range("N:T").Value = NA
Else
Range("N:T").Value = False
End If
Application.EnableEvents = True
End If
End Sub


---
Message posted from http://www.ExcelForum.com/


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
Getting around Worksheet_Change() mtowle Excel Worksheet Functions 1 October 20th 05 06:05 PM
Problems with "Worksheet_Change" konpego Excel Discussion (Misc queries) 0 July 5th 05 06:29 AM
Worksheet_Change Job[_2_] Excel Programming 1 August 13th 03 03:23 AM
worksheet_change vs. calculate, and worksheet_change not running Tom Ogilvy Excel Programming 1 July 14th 03 02:51 AM
worksheet_change vs. calculate, and worksheet_change not running Ross[_5_] Excel Programming 0 July 13th 03 04:27 PM


All times are GMT +1. The time now is 05:19 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"