Excel 2003 reverse Lookup

adulted

Active Member
Joined
Jan 22, 2004
Messages
339
Hello All,

I have a vehicle repair excel sheet which I've put together over several months. vlookup works well, however with over a couple hundred items in the PartTbl list, I would never remember the number to Type for the lookup the service required.

In A21 I place the number 3, In cell B21 The formula =IF(A21="","",VLOOKUP(A21,PartTbl,2)) returns the value Air Conditioning.

In cell A22 I place the number 2, In cell B22 the formula =IF(A22="","",VLOOKUP(A22,PartTbl,2)) returns the value AirBag

In cell A23 I place the number 1. In cell B23 the formula =IF(A23="","",VLOOKUP(A23,PartTbl,2)) returns the value Labour.

Is there a way possibly using Data Validation or something to look in the column B that I could see the service required and the number appears in Column A

Here is a short clip of those cells.


Excel 2003
ABCDEFGH
20TaskPARTNAMEPART#QTYUNITPRICEAMOUNT
213Air Conditioneracunit1109.00109.00
222AirbagG50 - 15"125.0025.00
231LabourPer Hour275.00150.00
AutoRepair
Cell Formulas
RangeFormula
G21=IF(A21="","",VLOOKUP(A21,PartTbl,4))
G22=IF(A22="","",VLOOKUP(A22,PartTbl,4))
G23=IF(A23="","",VLOOKUP(A23,PartTbl,4))
H21=IF(F21="","",G21*F21)
H22=IF(F22="","",G22*F22)
H23=IF(F23="","",G23*F23)
B21=IF(A21="","",VLOOKUP(A21,PartTbl,2))
B22=IF(A22="","",VLOOKUP(A22,PartTbl,2))
B23=IF(A23="","",VLOOKUP(A23,PartTbl,2))
E21=IF(A21="","",VLOOKUP(A21,PartTbl,3))
E22=IF(A22="","",VLOOKUP(A22,PartTbl,3))
E23=IF(A23="","",VLOOKUP(A23,PartTbl,3))
Named Ranges
NameRefers ToCells
PartTbl='E:\Software Samples\Excel\automotive\Bill Saunders\[Bill Saunders Car Repair - Copy 20.xls]Services'!$A$4:$F$178




Excel 2003
ABCDEF
3TaskPART NAMEPART #CostMarkUpTotal
41LabourPer Hour7511.2586.25
52AirbagG50 - 15"253.7528.75
63Air Conditioneracunit10916.35125.35
Services
Cell Formulas
RangeFormula
E4=D4*$G$4
E5=D5*$G$4
E6=D6*$G$4
F4=D4+E4
F5=D5+E5
F6=D6+E6



Thanks in advance
Paul
 
Last edited:

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Try this

Excel Workbook
AB
212Airbag
223Labour
231Air Conditioner
24
25
26
27
Lookup
#VALUE!
 
Upvote 0
Hello Peter_SSs,

Hmm very interesting. I placed your formulas as suggested and copied them down 2 cells. It did work, however your formula doesn't reflect the services I need to lookup.

Ideally, I would like to be able to use either Data Validation, or type in the service that will reflect on the Services I need. Otherwise I have to refer to the Services tab and remember the numbers for the service required.


Cell Formulas
RangeFormula
G21=IF(A21="","",VLOOKUP(A21,PartTbl,4))
G22=IF(A22="","",VLOOKUP(A22,PartTbl,4))
G23=IF(A23="","",VLOOKUP(A23,PartTbl,4))
H21=IF(F21="","",G21*F21)
H22=IF(F22="","",G22*F22)
H23=IF(F23="","",G23*F23)
A21=IF(B21="","",INDEX(PartTbl,MATCH(B21,INDEX(PartTbl,0,2),0),1))
A22=IF(B22="","",INDEX(PartTbl,MATCH(B22,INDEX(PartTbl,0,2),0),1))
B21=INDEX(PartTbl,0,2)
B22=INDEX(PartTbl,0,2)
B23=IF(A23="","",VLOOKUP(A23,PartTbl,2))
E21=IF(A21="","",VLOOKUP(A21,PartTbl,3))
E22=IF(A22="","",VLOOKUP(A22,PartTbl,3))
E23=IF(A23="","",VLOOKUP(A23,PartTbl,3))
Named Ranges
NameRefers ToCells
PartTbl='E:\Software Samples\Excel\automotive\Bill Saunders\[Bill Saunders Car Repair - Copy 20.xls]Services'!$A$4:$F$178



In trust
Paul
 
Upvote 0
Look back at my last post again. The information for cell B21 is a Data Validation formula, not a cell formula.

Select B21 then go in to the Data Validation dialog. In the Settings tab choose Allow: List and put the formula I suggested in the 'Source:' box

You can copy the validation to the other column B cells or you could actually select them all first before applying the DV.
 
Upvote 0
Hello Peter_SSs,

Wow I guess I should be looking into a grammar or reading course.

AMAZING!
MrExcel ROCKS ! ! ! !
Paul
 
Upvote 0
Glad it worked for you. Thanks for letting us know. :)
 
Upvote 0

Forum statistics

Threads
1,214,978
Messages
6,122,549
Members
449,089
Latest member
davidcom

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