LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,073
Default Automating entry in a cell

Hi,

This Worksheet_Change Event procedure adds 5000000 to any number
entered into column C. You could edit the code to suit your needs...

Private Sub Worksheet_Change(ByVal Target As Range)
'Change "C:C" to suit you needs
If Not Intersect(Target, Range("C:C")) Is Nothing Then
Dim rngCell As Range
For Each rngCell In Target
On Error Resume Next
Application.EnableEvents = False
'Change 5000000 to suit your needs
rngCell.Value = rngCell.Value + 5000000
Application.EnableEvents = True
Next rngCell
End If
End Sub

Paste the code into the worksheet's code module in the Visual Basic
Editor by right clicking the sheet tab, selecting "View Code" from the
popup menu then paste the copied code. Press Alt + F11 to return to
Excel.

If your Security level is higher than medium then go
Tools|Macro|Security... select Medium|OK|Close the workbook|ReOpen the
workbook|Select "Enable Macros" on the "Security Warning" dialog

Ken Johnson

 
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
Help with this conditional IF statement C-Dawg Excel Discussion (Misc queries) 3 May 15th 06 06:01 PM
cell color index comparison MINAL ZUNKE New Users to Excel 1 June 30th 05 07:11 AM
Data Validation / Cell Entry Steve Jones Excel Discussion (Misc queries) 4 March 23rd 05 03:23 PM
resolving a numeric cell entry for its meaning vtcrob Excel Worksheet Functions 0 February 4th 05 02:23 AM
Move the last entry in a column to a different cell, when the loc. MicroSoft Excell (?) Excel Worksheet Functions 2 January 7th 05 09:29 PM


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