View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
S Davis S Davis is offline
external usenet poster
 
Posts: 138
Default Do a lookup with VBA based on criteria in three cells

Hello,

This is a bit tricky to explain. Forgive me, I'll do my best.

Based on the contents of three cells on one sheet, I would like to
know the location (cell reference, ie $B$33) of the item desired, and
then return the contents of the cell immediately adjacent to it.

Let's say the cells I want to look up are he
A1=CommandX
A2=Room1
A3=Object3

I want to return "Desc" from another worksheet in the below example:


------------------Room1--------Description---------Room2--------
Description ..... RoomN
CommandX---Object1-------Desc------------------ObjectN+1---Desc.....
CommandX---Object2-------Desc------------------ ....
CommandX---Object3-------Desc...
.....
CommandY---ObjectN------Desc...
.......
CommandZ.........


So its not terribly pretty.

In english, the code would need to find the intercept of matching
Command and Room, find the Object for those, identify the cell
reference of that Object, and then return Desc from the column
immediately to the right.

Is this posssible?