Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Herb Wexler
 
Posts: n/a
Default Require a cell to be nonblank if another cell is nonblank

If A1 has any value entered I want to require B1 to be filled in.

For example if an employee puts ome thing in A1 I want them to put their
name in B1.

I'd also like to force todays date into C1
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Require a cell to be nonblank if another cell is nonblank

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 1 Then
Target.Offset(0, 1) = Environ("Username")
Target.Offset(0, 2) = Format(Date, "dd mmm yyyy")
End If
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

(remove nothere from the email address if mailing direct)

"Herb Wexler" wrote in message
...
If A1 has any value entered I want to require B1 to be filled in.

For example if an employee puts ome thing in A1 I want them to put their
name in B1.

I'd also like to force todays date into C1



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
Dates of a Day for a month & year cell formulas mikeburg Excel Discussion (Misc queries) 2 December 29th 05 11:14 PM
Transfer Cell Formatting for linked cells Scott Excel Discussion (Misc queries) 2 November 24th 05 12:04 AM
How to Copy the value of a cell to any given cell Memphis Excel Discussion (Misc queries) 4 October 21st 05 08:29 PM
cell color index comparison MINAL ZUNKE New Users to Excel 1 June 30th 05 07:11 AM
VLookup resulting in a blank cell... KempensBoerke Excel Worksheet Functions 1 October 28th 04 09:57 PM


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