Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sam Sam is offline
external usenet poster
 
Posts: 699
Default Excel Data Validations

I have created a form in excel that users fill out to enter change requests
with various data. One of my columns has drop down lists that are specific to
a hidden sheet that pulls categories and reasons...

If it is this category, it lists this specific list of reasons...

If the user changes its mind on the category, how can I get the reason
selected removed from the cell then they click on a different category.
Currently that specific reason stays in the cell regardless that a different
category has been selected, until they click on a new reason - is there a way
to clear the reason cell when the user selects a different category?
--
Susan M.
Project Controls Data Coordinator
  #2   Report Post  
Posted to microsoft.public.excel.programming
GS GS is offline
external usenet poster
 
Posts: 364
Default Excel Data Validations

SaM was thinking very hard :
I have created a form in excel that users fill out to enter change requests
with various data. One of my columns has drop down lists that are specific to
a hidden sheet that pulls categories and reasons...

If it is this category, it lists this specific list of reasons...

If the user changes its mind on the category, how can I get the reason
selected removed from the cell then they click on a different category.
Currently that specific reason stays in the cell regardless that a different
category has been selected, until they click on a new reason - is there a way
to clear the reason cell when the user selects a different category?


I do something similar with Expense Categories, Expense Subcategories,
where the value selected in the Expense Categories column determines
what displays in the Expense Subcategories dropdown. If the value in
the latter isn't found in the ExpenseCategories range after the
category is changed then ConditionalFormatting shades the subcategory
cell red. This is how I cue the user that something is wrong about the
action they just did, and so hints to now select the correct
subcategory associated with the category change. I found this to be a
lot more intuitive than to set up an event handler to monitor input
activity; -thay just use up resources and are generally a performance
hit if in a Change event. Since you already have the dropdowns working,
the CF is all you need if this satisfies your needs instead of a VBA
solution. Here's the formula I use in CF:
=InvalidSubcategory

Here's the defined name RefersTo for that:

=AND(Expenses!ExpenseCategory<"",UPPER(Expenses!E xpenseCategory)<"OTHER
EXPENSE",ISERROR(HLOOKUP(Expenses!ExpenseSubCatego ry,INDIRECT(SUBSTITUTE(Expenses!ExpenseCategory,"
","")),1,FALSE)))

Note that the only reason I use the SUBSTITUTE() function is because my
defined name ranges are all concatenated proper case derivitives of the
account name, and so the spaces are removed. (eg: "Office Supplies" as
an account display name is "OfficeSupplies" as the defined name for the
range that contains its subcategories. Otherwise, INDIRECT() will fail
if it tries to process the category with a space (or any other invalid
defined name characters).

The ISERROR() function handles if the subcategory doesn't belong to the
selected category, which if the case is what the HLOOKUP() function
will return.

The 'Other Expense' category doesn't have subcategories, so if it's
selected while something is in the subcategory cell I want it to turn
red as a cue to clear that cell.

And, of course, the Expense Category must already have been selected
for the subcategory dropdown to populate. How this works is as soon as
the user selects an expense category, the subcategories cell turns red
to cue the user that this is the next value to select.

HTH
Garry


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Excel Data Validations

Sam:
If you question is just about formulas and not VBA code in Excel VBA forms,
it would probably be better to post it in the Formulas section of the forum.
Hope you find a solution.

--
Rich Locus
Logicwurks, LLC


"SaM" wrote:

I have created a form in excel that users fill out to enter change requests
with various data. One of my columns has drop down lists that are specific to
a hidden sheet that pulls categories and reasons...

If it is this category, it lists this specific list of reasons...

If the user changes its mind on the category, how can I get the reason
selected removed from the cell then they click on a different category.
Currently that specific reason stays in the cell regardless that a different
category has been selected, until they click on a new reason - is there a way
to clear the reason cell when the user selects a different category?
--
Susan M.
Project Controls Data Coordinator

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 Validations Christopher Naveen[_2_] Excel Worksheet Functions 1 May 13th 08 08:55 AM
2 Data Validations Q Sean Excel Worksheet Functions 7 October 31st 07 11:56 AM
Multiple Data Validations Supe Excel Discussion (Misc queries) 1 August 9th 07 04:39 PM
data validations Catfish25 Excel Discussion (Misc queries) 2 August 30th 06 06:43 PM
3 data validations Mohan Excel Worksheet Functions 2 June 7th 06 07:47 PM


All times are GMT +1. The time now is 11:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"