Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default protect a cell based on values in range

Hi All,

As a new excel-writer I try to do the following, so far without success.

A cell B2 uses a validation list. A range of cells uses another
validationlist depending on the value of B2.

Let's say in B2 I can choose from a list of states and in the cells A4:A30 I
can choose from a list of cities in that state.

This is working alright, but how do I protect B2 from changing once a city
has been chosen?

In my actual application there are a few columns depending on the value in
B2 so I don't want it to change once these columns have been used.

TIA,

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default protect a cell based on values in range


Hello JeKaRe,

Data validation is a convenient tool but lacks the protrection featur
you want. To prevent the user from changing the list once the have mad
a selection would involve writing a VBA macro. To write the macro woul
require more details about how your application is setup.

Sincerely,
Leith Ros

--
Leith Ros
-----------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846
View this thread: http://www.excelforum.com/showthread.php?threadid=49426

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default protect a cell based on values in range

Hi Leith,

Your answer already gave me an idea in the right direction and i found a
solution.
(Perhaps i had been staring at the problem too long to think straight)

I wrote a function to check if the ranges have any data in them and based on
the return value I then lock or unlock the B2-cell.
Works like a charm.

Anyway, thanks for your input.

Season greetings and best wishes...
Jack.


"Leith Ross" wrote:


Hello JeKaRe,

Data validation is a convenient tool but lacks the protrection feature
you want. To prevent the user from changing the list once the have made
a selection would involve writing a VBA macro. To write the macro would
require more details about how your application is setup.

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=494264


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
Populating a cell based on a range of values (Part III) akkrug New Users to Excel 3 June 26th 08 08:28 PM
Populating a Cell based on a Range of Values (Part II) akkrug New Users to Excel 6 June 22nd 08 02:40 PM
Populating a cell based on a range of values akkrug New Users to Excel 2 June 20th 08 03:09 PM
formula for named cell/range based on cell values alex Excel Programming 2 August 25th 05 02:50 PM
Search/Filter to find values in another range based on two cell values Andy Excel Programming 2 April 29th 04 04:08 PM


All times are GMT +1. The time now is 01:34 AM.

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"