Vlookup from particular cells

GirishDhruva

Active Member
Joined
Mar 26, 2019
Messages
308
Hi everyone

Below i am stuck with one problem, that how to perform vlookup for only selected cells.

Here i have 2 sheets, from sheet2 i have to perform vlookup only for specific cells in Sheet1 row B
Can that be done?????

Sheet 1
[TABLE="width: 500"]
<tbody>[TR]
[TD]slno[/TD]
[TD]name[/TD]
[/TR]
[TR]
[TD]1111[/TD]
[TD]asdf[/TD]
[/TR]
[TR]
[TD]2222[/TD]
[TD]gadsffds[/TD]
[/TR]
[TR]
[TD]3333[/TD]
[TD]asdfqwer[/TD]
[/TR]
[TR]
[TD]4444[/TD]
[TD]gfaser[/TD]
[/TR]
[TR]
[TD]5555[/TD]
[TD]wqerf[/TD]
[/TR]
[TR]
[TD]6666[/TD]
[TD]vadsfgrwa[/TD]
[/TR]
[TR]
[TD]7777[/TD]
[TD]=vlookup[/TD]
[/TR]
[TR]
[TD]8888[/TD]
[TD]=vlookup[/TD]
[/TR]
[TR]
[TD]9999[/TD]
[TD]=vlookup[/TD]
[/TR]
</tbody>[/TABLE]

Sheet 2
[TABLE="width: 500"]
<tbody>[TR]
[TD]slno[/TD]
[TD]name[/TD]
[/TR]
[TR]
[TD]7777[/TD]
[TD]asdfsadg[/TD]
[/TR]
[TR]
[TD]8888[/TD]
[TD]afsdfew2[/TD]
[/TR]
[TR]
[TD]9999[/TD]
[TD]fdsgvdv[/TD]
[/TR]
</tbody>[/TABLE]

Thanks in advance
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Cells can contain a value OR a formula, not both.
And if a cell contains a formula and you enter a value the formula will be overwritten (and vice versa).

Maybe do something like this

In sheet 1

1. Enter your slno in column A
2. Enter your name values in column B (if you want a VLOOKUP leave the value in column B blank)
3. in Column C
=IF(D2="X",VLOOKUP(A2,Sheet2!$2:B1000,2,0),B2)
copy down the column

4. Now in column D put X if you want to perform a VLOOKUP of the slno otherwise the data will be copied from column B.

So your output is now in column C and will consist of a mixture of values from column B and VLOOKUPs where you specify an X in column C.

NOTE: If you're going to copy that data from column C elsewhere you'll need to Paste Values as or you will end up copying the formulas which you probably don't want.
 
Last edited:
Upvote 0
Cells can contain a value OR a formula, not both.
And if a cell contains a formula and you enter a value the formula will be overwritten (and vice versa).

Maybe do something like this

In sheet 1

1. Enter your slno in column A
2. Enter your name values in column B (if you want a VLOOKUP leave the value in column B blank)
3. in Column C
=IF(D2="X",VLOOKUP(A2,Sheet2!$2:B1000,2,0),B2)
copy down the column

4. Now in column D put X if you want to perform a VLOOKUP of the slno otherwise the data will be copied from column B.

So your output is now in column C and will consist of a mixture of values from column B and VLOOKUPs where you specify an X in column C.

NOTE: If you're going to copy that data from column C elsewhere you'll need to Paste Values as or you will end up copying the formulas which you probably don't want.

Thank you so much for your reply , this helped me
 
Upvote 0

Forum statistics

Threads
1,223,958
Messages
6,175,628
Members
452,661
Latest member
Nonhle

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