Three way lookup (1 row, two columns)

vijayamani1987

New Member
Joined
Mar 16, 2014
Messages
32
Here is my requirement...


Oct-13Nov-13Dec-13
Item nameCostMRPQtyCostMRPQtyCostMRPQty
clip 202532530 51830 6
stone clip 708027590 46590 8
oval clip 607216075 06080 2

<tbody>
</tbody>

I need to find the MRP value of stone clip for nov-13.

I am not much familiar with excel. Please give me a solution and thanks a lot in advance...
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Welcome to the MrExcel board!

Does this do what you want?

Excel Workbook
ABCDEFGHIJ
1Oct-13Nov-13Dec-13
2Item nameCostMRPQtyCostMRPQtyCostMRPQty
3clip202532530518306
4stone clip708027590465908
5oval clip607216075060802
6
7
8Itemstone clip
9DateNov-13
10ColumnMRP
11Result90
Lookup Value
 
Upvote 0
Thanks Peter...U made it as I requested.

But i got a problem. In B9 my input is in DD-MM-YY format. The formula gives #N/A error when i give date value other than 1. ie it works well when the date is 01-03-14, but it gives error when the date is 02-03-14. Hope I explained my problem well. Again looking for your help.
 
Upvote 0
I think we can use this formula if you are looking range dates comparison. i.e., suppose we have table with MRP data for 1-OCT-13 and 1-NOV-13.if we enter 15-OCT-13 date in cell B9 then below formula retrieve MRP on 1-OCT-13.

={IFERROR(INDEX(B3:J5,MATCH(B8,A3:A5,0),MATCH(INDIRECT(ADDRESS(ROW(B1),MAX(IF(B1:J1<>"",IF(B1:J1<=B9,COLUMN(B1:J1),""),"")))),B1:J1,0)+MATCH(B10,B2:D2,0)-1),"Data not available")}

we need to press ctrl+shift+enter after entering this formula in cell B9 to get array brackets.

Sory if it is not matching with you requirement.
 
Upvote 0
Also: Control+shift+enter, not just enter:
Rich (BB code):
=IFERROR(INDEX($B$3:$J$5,MATCH("stone clip",$A$3:$A$5,0),
  MATCH(1,IF(COLUMN($B$1:$J$1)-COLUMN($B$1)+1>=
  MATCH("1-Nov-13"+0,$B$1:$J$1-DAY($B$1:$J$1)+1,0),IF($B$2:$J$2="MRP",1)),0)),"")
 
Upvote 0
Thanks Peter...U made it as I requested.

But i got a problem. In B9 my input is in DD-MM-YY format. The formula gives #N/A error when i give date value other than 1. ie it works well when the date is 01-03-14, but it gives error when the date is 02-03-14. Hope I explained my problem well. Again looking for your help.

Try this small modification in Peter's formula:

Code:
=INDEX(B3:J5,MATCH(B8,A3:A5,0),MATCH([COLOR="#FF0000"]--TEXT(B9,"mm/yy")[/COLOR],B1:J1,0)+MATCH(B10,B2:D2,0)-1)

Markmzz
 
Upvote 0
Thanks Peter...U made it as I requested.

But i got a problem. In B9 my input is in DD-MM-YY format. The formula gives #N/A error when i give date value other than 1. ie it works well when the date is 01-03-14, but it gives error when the date is 02-03-14. Hope I explained my problem well. Again looking for your help.
My modification for this would be

Code:
=INDEX(B3:J5,MATCH(B8,A3:A5,0),MATCH(B9-DAY(B9)+1,B1:J1,0)+MATCH(B10,B2:D2,0)-1)
 
Upvote 0
Guys, in that same formula (Preferably Peter Ss or Markmzz formula) i need one more change.


Oct-13Nov-13Dec-13
Item nameCostMRPQtyCostMRPQtyCostMRPQty
clip202532530518306
stone clip708027590465908
oval clip607216075060802

<tbody>
</tbody>


If i didnt give the input value of one month, i want the formula to choose the value of previous available month ie. in this example if i search for march-14, the formula has to return to Dec-13.
Hope I gave a clear statement of the problem. Looking forward for help!!!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,429
Messages
6,124,840
Members
449,193
Latest member
MikeVol

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