View Full Version : Solved: Finding a range based off of two comboboxes

Sir Phoenix
06-09-2006, 03:37 PM
Hello, all... it's been awhile since I was last here. I wish to do the following.

I have two comboboxes, combobox A and combobox B in a Userform.

I have a spreadsheet with column A and B setup as follows:

cat moo
cat woof
cat bark
dog yip
dog yop

A typically repeats an undefined number of times. The contents of combobox A are the unique values in column A. The contents of combobox B are the values in B that correspond to A (B is disabled if A is empty.)

I am using a button that will look a combobox A and combobox B. If there is a matching set in the spreadsheet already, it will delete the row. If there's not, it will add the set, and then sort it.

Row deletion, sorting, I can do already. How do I determine whether there are a cell A-B to match cmb A and cmb B, and return that row if it does?

Sorry for any confusion, and thanks for the help!

06-10-2006, 07:23 AM
In the code concatonate the two combo box values and compare them to concatonated A-B columns for matching.. provided the cell A-B matches are in the same row...