Index or Lookup Problem Help!!

stephen.smith

Board Regular
Joined
Jul 7, 2010
Messages
119
Hi Guys
I am having a problem with an index or lookup formula.
I have a combo box in cell A2 which returns a value in cell B2 (value may be 1,2,3,4,5). I then have a value which must be input in cell C2 and based on this value I need a formula in cell D2 to perform an index formula based on the result of the combo box (B2) in cells F2:O2, and then from the index result perform a lookup formula to find the appropriate value from the lookup table in cells F3:O99.
If anyone needs anymore info please let me know.
Thanks
Stephen
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
I am not sure if I understood your setup properly, if your set up looks like this then the formula in D2 returns the value that intersect with row # in C2 and Col # B2

Excel Workbook
ABCDEFGHI
1Combo BoxReturned value from CBManual InputResult from table
24456Item-1Item-2Item-3Item-4
312952823
4115792687
51409415671
64513756
715922106132
Sheet1


But there must be more to this ....
 
Upvote 0
HI Jeanie, its very close to what im looking for but in the lookup table you have a an extra column beside each value with a note about that value so I need the formula to find the corresponding note to the appropriate value. Does that make sense?
Thanks for the help so far.
 
Upvote 0
HI Jeanie, its very close to what im looking for but in the lookup table you have a an extra column beside each value with a note about that value so I need the formula to find the corresponding note to the appropriate value. Does that make sense?
Thanks for the help so far.
Where is the data that C2 is matched against stored? Is it in column E?

If it is, try: =INDEX(F3:O99,MATCH(C2,E3:E99,0),B2)
 
Last edited:
Upvote 0
Hi Craig
I have in column F Item 1, Column G, Item 1 Notes, Column H Item 2, Column I Item 2 Notes, Column J Item 3, Column K Item 3 Notes and so on.
So if the combo box returns Item 2 I need the formula to look at the value that is manually input into C and then reference H and then show the matched note for that value from I. Is this what you need. Thanks
Stephen
 
Upvote 0
I'm sure that there's a quite simple method of doing this with a formula, but I can't think of one at the moment with the data formatted as it is. This UDF will do the trick though
Code:
Function StephenSmithLookup() As String
 
    Application.Volatile
 
    Dim LookUpVal As String, LookUpNo As Integer, MyRow As Integer, MyCol As Integer
 
    LookUpVal = Application.ThisCell.Offset(, -1).Value
    LookUpNo = Application.ThisCell.Offset(, -2).Value
 
    MyCol = Application.WorksheetFunction.Match("Item " & LookUpNo, Range("F1:O1"), 0) + 5
    MyRow = Application.WorksheetFunction.Match(LookUpVal, Range(Cells(2, MyCol), Cells(99, MyCol)), 0)
 
    StephenSmithLookup = Cells(MyRow + 1, MyCol + 1).Value
 
End Function

paste that into a module and call it into cell D3 with =StephenSmithLookup()
 
Upvote 0
Hi Guys here is the problem pasted below. Maybe this will help to solve the problem.
Thanks
Excel Workbook
ABCDEFGHIJKL
1Combo BoxCombo ResultManual InputTable ResultLookup Table
221.1NOF112233
311.2DEF1.1ABC1.1NOF1.1SAS
431.4LKO1.2DEF1.2MEF1.2MJB
521.2MEF1.3HIJ1.3POF1.3MKK
611.1ABC1.4KLM1.4JUF1.4LKO
721.4JUF1.5MNO1.5LKD1.5POL
81.6PQR1.6LCD1.6LLL
9
10Its the formula for column D that I dont Know how to perform??? Can you help.
Sheet1
 
Upvote 0
Try this :

Excel Workbook
ABCDEFGHIJKL
1Combo BoxCombo ResultManual InputTable ResultLookup Table
221.1NOF112233
311.2DEF1.1ABC1.1NOF1.1SAS
431.4LKO1.2DEF1.2MEF1.2MJB
521.2MEF1.3HIJ1.3POF1.3MKK
611.1ABC1.4KLM1.4JUF1.4LKO
721.4JUF1.5MNO1.5LKD1.5POL
81.6PQR1.6LCD1.6LLL
9
Sheet4
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,285
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top