PDA

View Full Version : Run HLOOKUP macro on outcome of Data Validation



simonc64
10-22-2012, 07:55 AM
Hopefully a simple one for VBA gurus out there! Please note im a novice!

I have a cell that users can select different options from using data validation, no problem.

However what I cant seem to fathom is, based on the selection from the drop down, how to run a macro that does an HLOOKUP for the selected value in a different (maybe hidden) sheet.

For example if the drop down selection = "Project Definition" I need a macro to run that goes to an admin worksheet and (opens the worksheet first if hidden) looks up "Project Definition" in the title row.

Sounds simple but its beyond me right now!


Any help appreciated!

Kenneth Hobs
10-22-2012, 09:19 AM
Did you need a macro to do it? Why not just use =HLookup? If you must do it in a macro, do it manually by =HLookup first and then post that here.

simonc64
10-22-2012, 11:57 AM
Yes I need a macro. The user selects from the drop down, then presses a command button to take him/her to the relevant admin area