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

This should be an easy one for the enlightened.

If cell in column E is not blank, clear contents of corresponding cell in
column C.

Otherwise, do nothing.

Thanks for your brains,

Scott
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default VBA Rookie Issue

Scott,

I think this will work for you:

With Range("E:E")
'in case no constants or no formulas - either will trigger an error
On Error Resume Next
.SpecialCells(xlCellTypeConstants).Offset(0, -2).ClearContents
.SpecialCells(xlCellTypeFormulas).Offset(0, -2).ClearContents
On Error GoTo 0
End With

hth,

Doug

"Scott Wagner" wrote in message
...
This should be an easy one for the enlightened.

If cell in column E is not blank, clear contents of corresponding cell in
column C.

Otherwise, do nothing.

Thanks for your brains,

Scott



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 477
Default VBA Rookie Issue

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column < 5 Then
Exit Sub
Else
If Target < "" Then
Target.Offset(0, -2).ClearContents
End If
End If
End Sub

"Scott Wagner" wrote:

This should be an easy one for the enlightened.

If cell in column E is not blank, clear contents of corresponding cell in
column C.

Otherwise, do nothing.

Thanks for your brains,

Scott

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
Rookie needs help! tbobo Excel Discussion (Misc queries) 4 March 22nd 06 09:10 PM
VBA Help Please (rookie issue) Scott Wagner Excel Programming 6 February 25th 06 02:24 AM
VBA Question (rookie issue) Scott Wagner Excel Programming 7 February 19th 06 11:29 PM
VBA Help please (rookie issue) Scott Wagner Excel Programming 6 February 19th 06 12:28 PM
Rookie q C3 Excel Programming 2 December 1st 04 01:31 PM


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