View Single Post
  #5   Report Post  
Debra Dalgleish
 
Posts: n/a
Default

Make sure you run the line:

Application.EnableEvents = True

as part of the error handling


c wrote:
I have run into one small problem with this code. It works excellent but
when I try to manually overwrite the contents in the cell I receive an error
message #1004. It indicates the problem is in:
Target.Value = Worksheets("Input").Range("J4") _
.Offset(Application.WorksheetFunction _
.Match(Target.Value, Worksheets("Input").Range("BILLINGCATEGORIES"), 0),
0)

I have entered code which exits the function as soon as error 1004 occurs
but then it will no longer display one of the two values in the list. Both
values are now shown in the cell. Is there a way to "reset" this, I hope
this somewhat makes sense.

thanks again for any help you may have to offer.

c

"Debra Dalgleish" wrote:


There's a sample workbook on my web site that shows a product name and
code in the Data Validation dropdown list. After an item is selected,
the cell shows only the product name. You may be able to adapt this to
your workbook.

On the following page:

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

Under the data validation heading, find 'Data Validation "Columns"' and
download the file named DataValNameID.xls


c wrote:

Greetings;
I have a question I am hoping someone will be able to help me with. My
overall goal is to create a dropdown list with a line of data in it. When
selected only the second half of the line will be shown in the cell.

What I plan on doing is entering all of my data into two columns (first
column + second = dropdown list, second column = what is shown in the cell).
I would then create a drop down list from multiple columns. Using alot of IF
statements in VBA with a Private Sub Worksheet_Change(ByVal Target As Range)
program that would chage the entry from first column and second column to
only second column.

I have two questions-
1) Is it even possible to have a dropdown list based on two cells?

2) Is there an easier way than this? Since I have about 100 entries and
may want to add more later.

Thanks in advance for any comments or suggestions.
c






--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html





--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html