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...
 
If ... 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.
I don't quite understand that as the month before March 14 is February 14 not December 13.
Anyway, the change shown below to my previous formula will draw the result from whatever the section immediately to the left of the lookup date is. Of course then you wouldn't be able to use the very first month in the table as the search month.
My modification for this would be

Rich (BB code):
=INDEX(B3:J5,MATCH(B8,A3:A5,0),MATCH(B9-DAY(B9)+1,B1:J1,0)+MATCH(B10,B2:D2,0)-4)
 
Last edited:
Upvote 0

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Sorry for the less clearance in my statement Peter_SSs. Here I am repeating.


ABCDEFGHIJ
1 Oct-13Nov-13Mar-14
2Item nameCostMRPQtyCostMRPQtyCostMRPQty
3clip202532530518306
4stone clip708027590465908
5oval clip607216075060802
6
7
8Itemstone clip
9DateNov-13
10ColumnMRP
11Result90


<colgroup><col style="font-weight: bold; width: 30px;"><col style="width: 92px;"><col style="width: 74px;"><col style="width: 56px;"><col style="width: 56px;"><col style="width: 56px;"><col style="width: 56px;"><col style="width: 56px;"><col style="width: 56px;"><col style="width: 56px;"><col style="width: 56px;"></colgroup><tbody>
</tbody>

In row-1, I may not use all the months. In this example jumped from Nov-13 to Mar-14.
So when I am looking for a particular month, if that month (& year) is not listed in row-1, I want the values of the previous available month.

For example if I am searching for Feb-14, it is not listed there. So I want to select the previous available month ie. Nov-13.
If I am searching for Mar-14, it has to select the Mar-14.

Hope I made a clear statement. Please give me a solution.
 
Upvote 0
Sorry for the less clearance in my statement Peter_SSs. Here I am repeating.


ABCDEFGHIJ
1Oct-13Nov-13Mar-14
2Item nameCostMRPQtyCostMRPQtyCostMRPQty
3clip202532530518306
4stone clip
708027590465908
5oval clip607216075060802
6
7
8Itemstone clip
9DateNov-13
10ColumnMRP
11Result90

<tbody>
</tbody>

In row-1, I may not use all the months. In this example jumped from Nov-13 to Mar-14.
So when I am looking for a particular month, if that month (& year) is not listed in row-1, I want the values of the previous available month.

For example if I am searching for Feb-14, it is not listed there. So I want to select the previous available month ie. Nov-13.
If I am searching for Mar-14, it has to select the Mar-14.

Hope I made a clear statement. Please give me a solution.

You dismissed the array formula....
Nevertheless, that tweaked only very slightly for the new requirements:


Oct-13Nov-13Mar-14
Item nameCostMRPQtyCostMRPQtyCostMRPQty
clip20
2532530518306
stone clip70
8027590465908
oval clip607216075060802




















Itemstone clip







DateFeb-14







ColumnMRP







Result90








<tbody>
</tbody>

B11, control+shift+enter, not just enter:
Rich (BB code):
=IFERROR(INDEX($B$3:$J$5,MATCH(A4,$A$3:$A$5,0),
  MATCH(1,IF(COLUMN($B$1:$J$1)-COLUMN($B$1)+1>=
  MATCH(B9,$B$1:$J$1-DAY($B$1:$J$1)+1,1),IF($B$2:$J$2=B10,1)),0)),"")
 
Last edited:
Upvote 0
Sorry for the less clearance in my statement Peter_SSs. Here I am repeating.


ABCDEFGHIJ
1Oct-13Nov-13Mar-14
2Item nameCostMRPQtyCostMRPQtyCostMRPQty
3clip202532530518306
4stone clip708027590465908
5oval clip607216075060802
6
7
8Itemstone clip
9DateNov-13
10ColumnMRP
11Result90

<tbody>
</tbody>

In row-1, I may not use all the months. In this example jumped from Nov-13 to Mar-14.
So when I am looking for a particular month, if that month (& year) is not listed in row-1, I want the values of the previous available month.

For example if I am searching for Feb-14, it is not listed there. So I want to select the previous available month ie. Nov-13.
If I am searching for Mar-14, it has to select the Mar-14.

Hope I made a clear statement. Please give me a solution.

Hi Vijayamani1987,

If I understand correctly what you want, maybe this can helps:

Code:
=INDEX(B3:J5,MATCH(B8,A3:A5,0),MATCH(--TEXT(B9,"mm/aa"),B1:J1)+MATCH(B10,B2:D2,0)-1)

Markmzz
 
Upvote 0
Does this small tweak to my original non-array formula from post #2 do what you want?

=INDEX(B3:J5,MATCH(B8,A3:A5,0),MATCH(B9-DAY(B9)+1,B1:J1,1)+MATCH(B10,B2:D2,0)-1)

Note that it is a slightly different interpretation of your requirement to Aladin.


@Markmzz
Did you really mean TEXT(B9,"mm/aa") ?
 
Upvote 0
Hi Vijayamani1987,

If I understand correctly what you want, maybe this can helps:

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

Markmzz

Hi Vijayamani1987,

A small modification in my formula (for english version - Thanks Peter)

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

Markmzz
 
Upvote 0
Ah, I was wondering where you got the "aa" from. :eek:
What language version do you use?

My default language is Portuguese. Here is the original formula:

Code:
=ÍNDICE(B3:J5;CORRESP(B8;A3:A5;0);CORRESP(--TEXTO(B9;"mm/[COLOR="#0000FF"][B]aa[/B][/COLOR]");B1:J1)+CORRESP(B10;B2:D2;0)-1)

Markmzz
 
Upvote 0

Forum statistics

Threads
1,216,235
Messages
6,129,650
Members
449,524
Latest member
RAmraj R

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