Index Matching against multiple columns

ajwoods

New Member
Joined
Nov 19, 2010
Messages
8
Hi there,
I am a relative novice at all this, so please bear with me. I have a spread sheet where i want to check a serial number against 2 possible columns that it would be in and then return the name of the person it has been issed to. At the moment i have it sorted that it will look in one column but can't get it to look at the other.

This is my equation:
=INDEX('Issue Name List'!$A$2:$J$2000,MATCH(C24,'Issue Name List'!$H$2:$H$2000,0),1)

I would like it to look it G2:G2000 as well.

Also when on a roll is there any way of stopping it retuning a value of N/A if the serial number isn't there yet and leaving the cell blank?

Thanks in advance
Chris:):)
 
Excel Workbook
ABCDEFGHIJ
1FornameSurnameHarnessLanyardsHookHookHelmetCablocKarabina
2CarlAblet10161XC5006
3RichardAustin20361299/01410203DF12210210-0397-16-100210-0398-16-10XO346010190VA1302
4LeeBrown20358884/03410047CV08020709-0210-6-100709-0210-6-1010161XC499110170VA
5KevinBryant
6NickCalderbank
7RickyCallender
8RichardElliss20362581/04410047CQ06180210-0282-16-100210-0283-16-1010161XC499010170VA1231
9NickFarmer20361820/04310098CD01920509-0864-2-100509-0859-2-1010161XC499810170VA0609
10MarkFrancis
11ChrisFranklin
12ChrisFriend10047CQ06200210-0138-16-100210-0140-16-1010155XI501610170VA1252
13AllanGraves
14KarlHarris
15ClintonHoldsworth
16LesHopkins
17DanielIreland
18MarkJiggins2035884/03310047CQ05810210-0281-16-100210-0284-16-1010154XI4045377983/4384210170VA1247
19ChrisKingXO1527
20ScottLammass10047CQ06150210-0136-16-100210-0285-16-1010154XI4046377983/4359210170VA1241
21BarryLaud
22AaronLeggett10117CD10440210-0137-16-100210-0139-16-1010154XI45444173210170VA0410
23LeeMayo20358884/03210098CO00300709-0315-6-100709-0097-6-1010151XI452810170VA0616
Issue Name List
Excel Workbook
ABCDEFGHIJKL
1ManufacturerProductSerial No.DescriptionCert no.SupplierWhere?FornameSurname
2NameTelPostcode
3MGOHooks0210-0281-16-10AJW-006-030810Heightworks7889 544213WS6 6BD1Issued#N/A#N/A
4MGOHooks0210-0284-16-10AJW-006-030810Heightworks7890 544213WS6 6BD1Issued#N/A#N/A
5MGOHooks0210-0138-16-10AJW-006-030810Heightworks7891 544213WS6 6BD1Issued#N/A#N/A
6MGOHooks0210-0140-16-10AJW-006-030810Heightworks7892 544213WS6 6BD1Issued#N/A#N/A
7MGOHooks0210-0139-16-10AJW-006-030810Heightworks7893 544213WS6 6BD1Issued#N/A#N/A
Hooks
 
Upvote 0

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Apart from trying solutions in msg#8 there might be another way:
Code:
= INDIRECT("'Issue Name List'!A" & MAX(('Issue Name List'!$G$2:$H$2000=C24)*(ROW('Issue Name List'!$G$2:$H$2000))))
but this MUST be Array-Entered. This means you commit the formula to the cell with Ctrl+Shift+Enter, not just Enter.
Once one of these is working, we'll sort out hiding the error if the value is not found in either column.
 
Upvote 0
This is my equation:
=INDEX('Issue Name List'!$A$2:$J$2000,MATCH(C24,'Issue Name List'!$H$2:$H$2000,0),1)

I would like it to look it G2:G2000 as well.
From msg#11 I note that Hooks are in columns F and G, rather than G and H.
 
Upvote 0
i'm sure if i had any hair left i'd be pulling it out.

thanks for all your help but it seems as though i am the weak link in all this. seem to be getting no where. tried copying that formula pasting it into the cell and then pressing shift crtl ent and nothing.

confused.com

scrap that, just tried chaanging all the H for F as i seem to be a bit stewed at the moment and HORRAH. Thanks for bearing with me.
 
Last edited:
Upvote 0
Chris

When you have the 1st issue sorted - it is easy to ignore the N/A and replace with anything you want. Even with Excel 2003. Just mimic the 2007 IFERROR function with the attached VBA code.

Code:
Option Explicit
Rem Takes the result of a formula as 1st parameter. If it is not an error then display it, else display 2nd parameter
Rem Based on [URL]http://support.microsoft.com/kb/280094[/URL]
Rem This function mimics the Excel 2007 equivalent
Rem =iferror(formula, failvalue) is equivalent to =if(iserror(formula),failvalue, formula)
 
Function IfError(formula As Variant, show As Variant)
On Error GoTo ErrorHandler
If IsError(formula) Then
    IfError = show
Else
    IfError = formula
End If
Exit Function
ErrorHandler:
Resume Next
End Function

Mike
 
Upvote 0
okay, got he first bit sorted,

now what am i meant to do with the VBA code? how do i get it to work? i have never dealt with VBA before.

cheers
 
Upvote 0
okay, got he first bit sorted,

now what am i meant to do with the VBA code? how do i get it to work? i have never dealt with VBA before.

cheers
It's all explained in the link within the code (on the line starting: Rem Based on)
 
Upvote 0

Forum statistics

Threads
1,215,972
Messages
6,128,037
Members
449,414
Latest member
sameri

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