Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default User enters data in one cell, want to block entry into another cel

I have this spreadsheet that if the user enters data in one cell I do not
want them to enter data into another cell. How can I accomplish this? Also
is there a way to put the cell that I don't want them to enter data into be
grayed out? Any help would be appreciated. Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default User enters data in one cell, want to block entry into another cel

Use both "Data Validation" to control the entry rule and "Conditional
Formatting" to control the format.


--

Regards,
Nigel




"LRay67" wrote in message
...
I have this spreadsheet that if the user enters data in one cell I do not
want them to enter data into another cell. How can I accomplish this?
Also
is there a way to put the cell that I don't want them to enter data into
be
grayed out? Any help would be appreciated. Thanks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default User enters data in one cell, want to block entry into another cel

There are 2 parts to this. First blocking entry. This can be done with custom
validation. If I want to block cell A1 from entry if B1 has a value I would

Select Cell A1
Select Data | Validation | Custom
Add this formula
=B1=""
Select Ok
Now when B1 has a value A1 can not accept a value.
Do the Same for B1 with the formula =A1=""

To give a grey appearance you can use conditional formatting.
Select A1
Select Format | Conditional Formatting... | Formula is
=B1<""
Select Format | Pattern | Grey colour.
Repeate for Cell B1
--
HTH...

Jim Thomlinson


"LRay67" wrote:

I have this spreadsheet that if the user enters data in one cell I do not
want them to enter data into another cell. How can I accomplish this? Also
is there a way to put the cell that I don't want them to enter data into be
grayed out? Any help would be appreciated. Thanks

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 523
Default User enters data in one cell, want to block entry into another cel

Right-click the tab and view code - paste this in (changeing A1 & B1 to the
cells you want.

Private Sub Worksheet_Change(ByVal Target As Range)

Application.EnableEvents = False
Dim ws As Worksheet
ActiveSheet.Unprotect

On Error GoTo ErrorCatcher

If Not Intersect(Target, Range("A1")) Is Nothing Then
With Range("B1")
If IsEmpty(Range("A1")) Then
.Interior.ColorIndex = -4142
.Locked = False
Else
.Interior.ColorIndex = 15
.Locked = True
End If
End With
End If

ErrorCatcher:
Application.EnableEvents = True
ActiveSheet.Protect

End Sub

"LRay67" wrote:

I have this spreadsheet that if the user enters data in one cell I do not
want them to enter data into another cell. How can I accomplish this? Also
is there a way to put the cell that I don't want them to enter data into be
grayed out? Any help would be appreciated. Thanks

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default User enters data in one cell, want to block entry into another

Jim, thanks that does work, except one of the cell's I want to block has a
drop down list for them to select from. In this case I can't select the
custom way without losing my drop-down selections. Anyway around this
situation??

"Jim Thomlinson" wrote:

There are 2 parts to this. First blocking entry. This can be done with custom
validation. If I want to block cell A1 from entry if B1 has a value I would

Select Cell A1
Select Data | Validation | Custom
Add this formula
=B1=""
Select Ok
Now when B1 has a value A1 can not accept a value.
Do the Same for B1 with the formula =A1=""

To give a grey appearance you can use conditional formatting.
Select A1
Select Format | Conditional Formatting... | Formula is
=B1<""
Select Format | Pattern | Grey colour.
Repeate for Cell B1
--
HTH...

Jim Thomlinson


"LRay67" wrote:

I have this spreadsheet that if the user enters data in one cell I do not
want them to enter data into another cell. How can I accomplish this? Also
is there a way to put the cell that I don't want them to enter data into be
grayed out? Any help would be appreciated. Thanks



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default User enters data in one cell, want to block entry into another

Nice, very useful!

"Jim Thomlinson" wrote:

There are 2 parts to this. First blocking entry. This can be done with custom
validation. If I want to block cell A1 from entry if B1 has a value I would

Select Cell A1
Select Data | Validation | Custom
Add this formula
=B1=""
Select Ok
Now when B1 has a value A1 can not accept a value.
Do the Same for B1 with the formula =A1=""

To give a grey appearance you can use conditional formatting.
Select A1
Select Format | Conditional Formatting... | Formula is
=B1<""
Select Format | Pattern | Grey colour.
Repeate for Cell B1
--
HTH...

Jim Thomlinson


"LRay67" wrote:

I have this spreadsheet that if the user enters data in one cell I do not
want them to enter data into another cell. How can I accomplish this? Also
is there a way to put the cell that I don't want them to enter data into be
grayed out? Any help would be appreciated. Thanks

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
Data entered from list automatically enters number in another cell gbryce Excel Worksheet Functions 4 February 20th 10 03:21 PM
data enters date in next cell for several columns HELP ME PLEASE Excel Worksheet Functions 6 February 29th 08 03:11 AM
Selecting from drop down list enters multiple cell data DebbieV Excel Worksheet Functions 5 January 21st 08 01:39 PM
Copy cell properties from master when user enters a new line. Hippy Excel Programming 1 January 13th 06 11:23 PM
User enters data in popup box - its entered into desired cell ian123[_30_] Excel Programming 1 December 28th 03 03:16 PM


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