Comparing 2 Cells again 2 different Cells and return an offset

MartinSmith

New Member
Joined
Dec 1, 2015
Messages
22
Hi quite new to this,

My question is how to compare 2 cells in sheet 1 against 2 cells in sheet 2 and if the cells in sheet 1 match those in sheet 2 then return an offset of from the match cells in sheet 2.

Index, Match or vLookUp??? Is there another database function?

Looking forward to your response
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hi quite new to this,

My question is how to compare 2 cells in sheet 1 against 2 cells in sheet 2 and if the cells in sheet 1 match those in sheet 2 then return an offset of from the match cells in sheet 2.

Index, Match or vLookUp??? Is there another database function?

Looking forward to your response
Hi Martin, welcome to the boards.

You will need to give us some more specific details such as what cells are being compared and exactly what the offset you need. Once we have those details you stand a better chance of getting assistance.

Based on what little information we have been given I can at least outline how I envision the formula working:

It would start with something like =(IF(AND(Sheet1!A1=Sheet2!A1,Sheet1!B1=Sheet2!B1) and then end with an index match.

As you can see without the specifics there isn't much we can do for you.
 
Upvote 0
Hi Fishboy

This is Sheet1 and the it is Columns D (Zone) and E (Station) that need to be completed depending on the values in A (Team) & B (Part code). Looking up on Team and Partcode in sheet2 and returning the Zone and station information from Sheet2 columns E&F

I hope this is a little bit clearer now! Let me know if you need more info.

Thanks Martin

Sheet1
ABCDE
1TeamPart code ZoneStation
24K2BIW FormulaFormula
34K2BIW
44K6BM
54E1CAB
64K3FB
74K7DG
84K7DSB
94K3UTH
104K3UTH
114K7GLZ
124K7DG
134E2SWS
144A1I1
154E5I1
164E5I1

<tbody>
</tbody><colgroup><col><col><col><col><col span="2"></colgroup>

Sheet2
ABCDEF
1Team CodeProduct DescriptionPart codeZONESTATION
24A1Widget 1CEZone 11
34K2Widget 2BIWZone 12
4l1Widget 3l1Zone 21
54A1Widget 4EIWZone 33
64A1Widget 5ESUZone 25

<tbody>
</tbody><colgroup><col><col><col><col><col><col><col></colgroup>
 
Upvote 0
For Sheet1 try this, copied across to E2 and down - after adjusting the row range for Sheet2 to cover at least as many rows as you will likely ever have.

D2: =INDEX(Sheet2!E$2:E$1000,MATCH($A2&"|"&$B2,INDEX(Sheet2!$A$2:$A$1000&"|"&Sheet2!$C$2:$C$1000,0),0))
 
Upvote 0
Hi Peter_SSs

That's the solution, works like a charm.

I thought I knew Excel until I came across this site!

Thank you both for your fast response.

Martin
 
Upvote 0
Hi Peter_SSs

That's the solution, works like a charm.

I thought I knew Excel until I came across this site!

Thank you both for your fast response.

Martin
Glad it worked for you. Thanks for letting us know.
 
Upvote 0

Forum statistics

Threads
1,215,459
Messages
6,124,948
Members
449,198
Latest member
MhammadishaqKhan

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