LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Delete cell entry and default contents are restored, for multiplerows

I currently have a macro that allows the content in B1 to be reflected
in A1 until I enter a different number in A1. If I choose to delete
the entry I made in A1, by default the B1 content will once again
appear in A1. My macro is as follows:

Private Sub Worksheet_Change(ByVal TargetCell As Range)
If Not Intersect(TargetCell, Range("A1")) Is Nothing Then
If TargetCell = "" Then
TargetCell = "=B1"
End If
End If
End Sub

Here is my problem. I have approximately 3000 rows, all of which need
to perform in the same way as stated above. Instead of creating a
macro for each row, I need a single macro that will perform the
assignment. Can anyone offer a solution? I thank you in advance.
 
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
delete contents of cell RDC Excel Discussion (Misc queries) 1 January 21st 09 04:13 PM
Default colour in cell based on specific entry KCG Excel Worksheet Functions 4 August 5th 07 09:26 AM
Delete cell contents Rob[_4_] Excel Discussion (Misc queries) 7 April 10th 07 12:34 PM
Delete Cell Contents IF joecrabtree Excel Programming 3 December 18th 06 02:21 PM
Data entry - Copy contents of cell typed in one cell to another ce danie Excel Worksheet Functions 2 March 16th 06 06:51 PM


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

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

About Us

"It's about Microsoft Excel"