Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 41
Default Force entry into cell, based on validation selection in adjacent cell

Hi

I've looked at other posts and can't seem to find what I need so
apologies if it is posted elsewhere.

I have two columns, the first column has validation as a List to
select a number of items. If a certain item is selected, then only
for this item, I want the cell in the column next to this item to
prompt the user to enter some data (just text).

So imagine 10 rows, with all in column A as a validated drop down:


A B
1 Banana
2 Banana
3 Apple
4 Cheese Stilton
5 Orange
6 Kiwi
7 Cheese Wenselydale
8 Pear
9 Banana
10 Orange

When Cheese is selected a pop up box appears saying 'Enter Type', and
the user has to enter the type free format?

Is this just some MsgBox VB based on the entry? I.e what type of event
is it if I do the code.

If Range ("A1) = "Cheese" Then
msgBox "Enter Type "
Range ("A2).Select


Also

If I wanted to make the cell colour yellow, until a value is then
entered, what would I enter?

Cheers

Rich
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default Force entry into cell, based on validation selection in adjacent c

Hi,
You can apply dependent list, see Debra web for example and explanation

http://www.contextures.com/xlDataVal02.html

"Richhall" wrote:

Hi

I've looked at other posts and can't seem to find what I need so
apologies if it is posted elsewhere.

I have two columns, the first column has validation as a List to
select a number of items. If a certain item is selected, then only
for this item, I want the cell in the column next to this item to
prompt the user to enter some data (just text).

So imagine 10 rows, with all in column A as a validated drop down:


A B
1 Banana
2 Banana
3 Apple
4 Cheese Stilton
5 Orange
6 Kiwi
7 Cheese Wenselydale
8 Pear
9 Banana
10 Orange

When Cheese is selected a pop up box appears saying 'Enter Type', and
the user has to enter the type free format?

Is this just some MsgBox VB based on the entry? I.e what type of event
is it if I do the code.

If Range ("A1) = "Cheese" Then
msgBox "Enter Type "
Range ("A2).Select


Also

If I wanted to make the cell colour yellow, until a value is then
entered, what would I enter?

Cheers

Rich

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 269
Default Force entry into cell, based on validation selection in adjacent c

The event you are looking for is
Private Sub Worksheet_Change(ByVal Source As Range)

Do Stuff

End sub
This would go on the individual sheet in VBA and not a module.

You can use the Source to only act on certain changes such as
if Source.Column = 1 then
Check for specific inputs and do stuff
If Source.value="Cheese" Then
msgBox "Enter Type in Column B"
end if
end if

Even better you could use an input box and force a type selection and enter
it for them
if Source.Column = 1 then
Check for specific inputs and do stuff
If Source.value="Cheese" Then
chtype = Val(InputBox("Cheese Type"))
Cells(Source.row +1,Source.column)=chtype
end if
end if
--
If this helps, please remember to click yes.


"Richhall" wrote:

Hi

I've looked at other posts and can't seem to find what I need so
apologies if it is posted elsewhere.

I have two columns, the first column has validation as a List to
select a number of items. If a certain item is selected, then only
for this item, I want the cell in the column next to this item to
prompt the user to enter some data (just text).

So imagine 10 rows, with all in column A as a validated drop down:


A B
1 Banana
2 Banana
3 Apple
4 Cheese Stilton
5 Orange
6 Kiwi
7 Cheese Wenselydale
8 Pear
9 Banana
10 Orange

When Cheese is selected a pop up box appears saying 'Enter Type', and
the user has to enter the type free format?

Is this just some MsgBox VB based on the entry? I.e what type of event
is it if I do the code.

If Range ("A1) = "Cheese" Then
msgBox "Enter Type "
Range ("A2).Select


Also

If I wanted to make the cell colour yellow, until a value is then
entered, what would I enter?

Cheers

Rich

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 41
Default Force entry into cell, based on validation selection in adjacentc

Thank you both, that is great, Cheers.
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 Validation-Only allow entry into cell if adjacent cell is fil KKD Excel Discussion (Misc queries) 2 June 6th 09 12:12 AM
Selecting a cell entry based on cell validation selection Brutalius Excel Worksheet Functions 2 December 17th 08 03:44 AM
Sum of cells based on entry of adjacent cell cware Excel Worksheet Functions 2 June 19th 08 09:56 PM
Force entry in one cell based on value of another cell Kebbon Excel Worksheet Functions 3 August 16th 07 09:52 PM
Validation to force entry in a cell Matt D Francis Excel Worksheet Functions 4 October 4th 05 02:38 PM


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