Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Default cell name and value

I'm creating an excel template that I need users to populate. I want
to mark the required input cells as "<enter"; which should equate to
zero.

If users subsequently delete their number, I want the field to default
back to "<enter".

What's the simplest way to do this?

Mike

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 380
Default Default cell name and value

Put <enter in those cells to begin, and then add

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "G1,H5,K6,L10" '<=== change to suit

On Error GoTo ws_exit
Application.EnableEvents = False
If Not Intersect(Target, rang(WS_RANGE)) Is Nothing Then
If Target.Value = "" Then
Target.Value = "<enter"
End If
End If

ws_exit:
Application.EnableEvents = True
End Sub


This is worksheet event code, which means that it needs to be
placed in the appropriate worksheet code module, not a standard
code module. To do this, right-click on the sheet tab, select
the View Code option from the menu, and paste the code in.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

wrote in message
oups.com...
I'm creating an excel template that I need users to populate. I want
to mark the required input cells as "<enter"; which should equate to
zero.

If users subsequently delete their number, I want the field to default
back to "<enter".

What's the simplest way to do this?

Mike



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 04:09 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"