Vlookup or vba or code

Vishaal

Well-known Member
Joined
Mar 16, 2019
Messages
533
Office Version
  1. 2010
  2. 2007
Platform
  1. Windows
  2. Web
Thanks in advance

I am using the following vlookup

Lookup value = C10
Table array =sheet1!$B$2:$GKX$5
Col index = 5041
Range lookup=0

Now problem is
I want to change the table array "sheet1!$B$2:$GKX$5" for coloumn from B to GKW

And also change the coloumn index accordingly, like 5040, 5039
 
Any way this is how I figured out to solve you Q

=VLOOKUP(A3;INDIRECT("sheet1!"&ADDRESS(2;COLUMN()-1)&":"&"$D$5");COLUMN()-6;0)

Have a good play with
 
Upvote 0

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Hi,

pls find the sheets

First sheet where we have the vlookup

Col ACol BCol CCol DCol E
Row 1
Row 2
Row 3
Row 4
Row 5
Row 6
Row 7
Row 8
Row 9200
Row 10420
Row 11510
Row 12605
Row 13709
Row 14804
Row 15901
Row 16105
Row 17206
Row 18303

<colgroup><col width="64" span="6" style="width:48pt"> </colgroup><tbody>
</tbody>

Second Sheet

205150520205520205150Yes
403140201403201403140Yes
150160360150360150160Yes

<colgroup><col width="64" span="8" style="width:48pt"> </colgroup><tbody>
</tbody>

need this result

Col ACol BCol CCol DCol ECol FCol GCol HCol I
Row 1
Row 2
Row 3
Row 4
Row 5
Row 6
Row 7
Row 8
Row 9200 #N/A#N/A#N/A#N/A#N/A
Row 10420 #N/A#N/A#N/A#N/A#N/A
Row 11510 #N/A#N/A#N/A#N/A#N/A
Row 12605 #N/A#N/A#N/A#N/A#N/A
Row 13709 #N/A#N/A#N/A#N/A#N/A

<colgroup><col width="64" span="10" style="width:48pt"> </colgroup><tbody>
</tbody>

Column E
Vlookup
=VLOOKUP(B10,[Book2]Sheet1!$B$2:$8,0)
=VLOOKUP(B11,[Book2]Sheet1!$B$2:$8,0)
=VLOOKUP(B12,[Book2]Sheet1!$B$2:$8,0)
=VLOOKUP(B13,[Book2]Sheet1!$B$2:$8,0)
=VLOOKUP(B14,[Book2]Sheet1!$B$2:$8,0)

Coloumn F vlookup

=VLOOKUP(B10,[Book2]Sheet1!$C$2:$7,0)
=VLOOKUP(B11,[Book2]Sheet1!$C$2:$7,0)
=VLOOKUP(B12,[Book2]Sheet1!$C$2:$7,0)
=VLOOKUP(B13,[Book2]Sheet1!$C$2:$7,0)
=VLOOKUP(B14,[Book2]Sheet1!$C$2:$7,0)

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

Coloumn G vlookuo

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

=VLOOKUP(B10,[Book2]Sheet1!$D$2:$6,0)
=VLOOKUP(B11,[Book2]Sheet1!$D$2:$6,0)
=VLOOKUP(B12,[Book2]Sheet1!$D$2:$6,0)
=VLOOKUP(B13,[Book2]Sheet1!$D$2:$6,0)
=VLOOKUP(B14,[Book2]Sheet1!$D$2:$6,0)

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

pls check and update me
 
Upvote 0
Try something like
Code:
Sub Vishaal()
   Range("E2:G12").Formula = "=index(Sheet1!$GKW$2:$GKW$10,match($B2,Sheet1!B$2:B$12,0))"
End Sub
Also in future, please be patient, we are all volunteers giving what free time we have.
 
Upvote 0
You can check this sheet


Excel 2010 32 bit
BCDEFGHIJK
1
2120180207110
3260540304108
4340140105101
5260470205290
6480210310401
7
8
9
10220
11120
12540
13290
14310
Sheet1


in this sheet we have taken all the data in one sheet

First Column C (Row10 ) Data will be check from Column H (Row 2 to 6) and if the value 220 match, show the value Yes or No in Column H (Row 10)
First Column C (Row11 ) Data will be check from Column H (Row 2 to 6) and if the value 120 match, show the value Yes or No in Column H (Row 11)
First Column C (Row12 ) Data will be check from Column H (Row 2 to 6) and if the value 540 match, show the value Yes or No in Column H (Row 12)
First Column C (Row13 ) Data will be check from Column H (Row 2 to 6) and if the value 290 match, show the value Yes or No in Column H (Row 13)
First Column C (Row14 ) Data will be check from Column H (Row 2 to 6) and if the value 310 match, show the value Yes or No in Column H (Row 14)

First Column C (Row10 ) Data will be check from Column I (Row 2 to 6) and if the value 220 match, show the value Yes or No in Coloumn I (Row 10)
First Column C (Row11 ) Data will be check from Column I (Row 2 to 6) and if the value 120 match, show the value Yes or No in Coloumn I (Row 11)
First Column C (Row12 ) Data will be check from Column I (Row 2 to 6) and if the value 540 match, show the value Yes or No in Coloumn I (Row 12)
First Column C (Row13 ) Data will be check from Column I (Row 2 to 6) and if the value 290 match, show the value Yes or No in Coloumn I (Row 13)
First Column C (Row14 ) Data will be check from Column I (Row 2 to 6) and if the value 310 match, show the value Yes or No in Coloumn I (Row 14)

First Column C (Row10 ) Data will be check from Column J (Row 2 to 6) and if the value 220 match, show the value Yes or No in Coloumn J (Row 10)
First Column C (Row11 ) Data will be check from Column J (Row 2 to 6) and if the value 120 match, show the value Yes or No in Coloumn J (Row 11)
First Column C (Row12 ) Data will be check from Column J (Row 2 to 6) and if the value 540 match, show the value Yes or No in Coloumn J (Row 12)
First Column C (Row13 ) Data will be check from Column J (Row 2 to 6) and if the value 290 match, show the value Yes or No in Coloumn J (Row 13)
First Column C (Row14 ) Data will be check from Column J (Row 2 to 6) and if the value 310 match, show the value Yes or No in Coloumn J (Row 14)

Help Please
 
Upvote 0
Try and tell me PLS
Cell H11=IFNA(VLOOKUP(INDIRECT(ADDRESS(ROW();COLUMN()-5));INDIRECT(ADDRESS(2;COLUMN())&":"&"$k$7");COLUMN()-7;0);"NO") And drag down
Cell I11=IFNA(VLOOKUP(INDIRECT(ADDRESS(ROW();COLUMN()-6));INDIRECT(ADDRESS(2;COLUMN())&":"&"$k$7");COLUMN()-8;0);"NO") And drag down
Cell j11=IFNA(VLOOKUP(INDIRECT(ADDRESS(ROW();COLUMN()-7));INDIRECT(ADDRESS(2;COLUMN())&":"&"$k$7");COLUMN()-9;0);"NO") And drag down
cell k11=IFNA(VLOOKUP(INDIRECT(ADDRESS(ROW();COLUMN()-8));INDIRECT(ADDRESS(2;COLUMN())&":"&"$k$7");COLUMN()-10;0);"NO") And drag down



At least almost?
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,218
Messages
6,123,676
Members
449,116
Latest member
HypnoFant

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