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

I want to use VB to do the following:
if cell h10 is text then upon exit of cell h10 clear cell f10. if cell h10
is a number, then do nothing to cell f10. I want this to apply to cell h10
f10

h11 f11

h12 f12

h13 f13

Thank You
brian
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default Need help please

Hi Brian,

Try the following :-

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row < 10 Or Target.Row 13 Then Exit Sub
Application.EnableEvents = False
If Target.Column = 8 Then
If IsNumeric(Target) = False Then
If Len(Target) 0 Then
Target.Offset(0, -2) = ""
End If
End If
End If
Application.EnableEvents = True
End Sub

Cells in the F column should remain except whn text is entered in the H
column.
Clearing F10 etc. will have no effect.

regards,
Don

"Brian" wrote in message
...
I want to use VB to do the following:
if cell h10 is text then upon exit of cell h10 clear cell f10. if cell
h10
is a number, then do nothing to cell f10. I want this to apply to cell
h10
f10

h11 f11

h12 f12

h13 f13

Thank You
brian



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



All times are GMT +1. The time now is 11:37 PM.

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"