formula require...

VBABEGINER

Well-known Member
Joined
Jun 15, 2011
Messages
1,232
hi all,

I need formula, where lookup values are in two different columns, and with combination of these 2 values I want to find an answer....

Column AColumn BColumn CColumn DColumn E
ELpqr
30L1104060
31L2205070
31L1306080
Value to findAnswer Require..
31L180

<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>

I use this formula, but these is something wrong..
=VLOOKUP(AND(A4,B4),A2:E4,3,FALSE)
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
If you are always looking in column E

Excel 2010
ABCDE
1ELpqr
230L1104060
331L2205070
431L1306080
5
6value o findanswer
731l180

<colgroup><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet4

Array Formulas
CellFormula
C7{=INDEX(E2:E4,MATCH(A7&B7,A2:A4&B2:B4,0))}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>
 
Last edited:
Upvote 0
Is there a way to do this without using array? Just curious to know alternative ways of doing this.
 
Upvote 0
Try,

=VLOOKUP(A4&B4,IF({1,0},INDEX(A1:A4&B1:B4,0),E1:E4),2,FALSE)

Regards
Bosco
 
Upvote 0
Is there a way to do this without using array? Just curious to know alternative ways of doing this.

You could use a helper column to concatenate the two columns to avoid and array formula.


Excel 2010
ABCDEF
1ELpqrhelper
230L110406030L1
331L220507031L2
431L130608031L1
5
6value o findanswer
731l180
Sheet4
Cell Formulas
RangeFormula
F2=A2&B2
F3=A3&B3
F4=A4&B4
C7=INDEX(E2:E4,MATCH(A7&B7,F2:F4,0))
 
Upvote 0
Or, using post #2 table, in C7 :

=SUMIFS(E2:E4,A2:A4,A7,B2:B4,B7)

Regards
Bosco
 
Upvote 0
I really dont understand how this works..?
Simple enter..nothing giving..
ctr shft enter ... giving me answer...I understand that this is array technology...but how...


If you are always looking in column E

Excel 2010
ABCDE
1ELpqr
230L1104060
331L2205070
431L1306080
5
6value o findanswer
731l180

<tbody>
</tbody>
Sheet4

Array Formulas
CellFormula
C7{=INDEX(E2:E4,MATCH(A7&B7,A2:A4&B2:B4,0))}

<tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>
 
Upvote 0
I really dont understand, how this too work???

it giving my answer..but worked...how..?

some Questions..

1. what IF is doing here..
2. Why column index taken 2, wherein it should be 3?



Try,

=VLOOKUP(A4&B4,IF({1,0},INDEX(A1:A4&B1:B4,0),E1:E4),2,FALSE)

Regards
Bosco
 
Upvote 0
I really dont understand, how this too work???

it giving my answer..but worked...how..?

some Questions..

1. what IF is doing here..
2. Why column index taken 2, wherein it should be 3?

=VLOOKUP(A4&B4,IF({1,0},INDEX(A2:A4&B2:B4,0),E2:E4),2,FALSE)

>>

=VLOOKUP("31L1",IF({1,0},{"30L1";"31L2";"31L1"},{60;70;80}),2,FALSE)

>>

=VLOOKUP("31L1",{"30L1",60;"31L2",70;"31L1",80},2,FALSE)

>>

=80

Regards
Bosco
 
Upvote 0

Forum statistics

Threads
1,215,759
Messages
6,126,727
Members
449,332
Latest member
nokoloina

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