Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help with this conditional IF statement | Excel Discussion (Misc queries) | |||
cell color index comparison | New Users to Excel | |||
Data Validation / Cell Entry | Excel Discussion (Misc queries) | |||
resolving a numeric cell entry for its meaning | Excel Worksheet Functions | |||
Move the last entry in a column to a different cell, when the loc. | Excel Worksheet Functions |