Hi,
I've been searching the net for an example of my problem, but alas I can't find it.
Basically I need to select a department name and related code number on a dropdown on a main page (Sheet1). To do this I need to be able to either select the name, or the code, on the two lists located in two cells next to eachother. These would reference the two columns of data in Sheet2. i.e
Sheet1
A1 (dropdown for Department), B1 (dropdown for Code) - selecting either, will display the correct data on the other.
Sheet2
A1 Accounts __________B1 1234
A2 Resources _________B2 0987
A3 Facilities __________ B3 1212
etc.
The data here would never change i.e. "Accounts" would always be "1234". So in Sheet1, if I selected "Accounts" from the dropdown, "1234" would appear in the dropdown next to it - and vice versa.
Once this was in place, any further forms I created, could reference cells A1 and B1 from Sheet1 to allow the current selection to appear on them.
I experimented with Data Validation at first, but limited to one column and finding no way to marry up two Data Validation sets, I gave up. Then I tried Comboboxes, then listboxes but still got stuck. Other examples online were not near enough to my problem and used reams of code.
I get the feeling this shouldn't be that difficult - it's just been a long time since I've tinkered with Excel VBA.
Can anyone help, thanks
Mark.
I've been searching the net for an example of my problem, but alas I can't find it.
Basically I need to select a department name and related code number on a dropdown on a main page (Sheet1). To do this I need to be able to either select the name, or the code, on the two lists located in two cells next to eachother. These would reference the two columns of data in Sheet2. i.e
Sheet1
A1 (dropdown for Department), B1 (dropdown for Code) - selecting either, will display the correct data on the other.
Sheet2
A1 Accounts __________B1 1234
A2 Resources _________B2 0987
A3 Facilities __________ B3 1212
etc.
The data here would never change i.e. "Accounts" would always be "1234". So in Sheet1, if I selected "Accounts" from the dropdown, "1234" would appear in the dropdown next to it - and vice versa.
Once this was in place, any further forms I created, could reference cells A1 and B1 from Sheet1 to allow the current selection to appear on them.
I experimented with Data Validation at first, but limited to one column and finding no way to marry up two Data Validation sets, I gave up. Then I tried Comboboxes, then listboxes but still got stuck. Other examples online were not near enough to my problem and used reams of code.
I get the feeling this shouldn't be that difficult - it's just been a long time since I've tinkered with Excel VBA.
Can anyone help, thanks
Mark.