Copy and Replace with Vlookup Formula

vbanoob1234

New Member
Joined
Aug 8, 2016
Messages
26
Hello everyone,

My goal is to find all YELLOW highlighted cells that are currently empty, and replace it with a vlookup formula like this:
=Vlookup(A1,A:Z,2,False)

The issue is when you use the Find and Replace function, the lookup value of A1 is an absolute value. I need the lookup value to be relative.
Eg.
A1 =Vlookup(A1,A:Z,2,False)
A2 =Vlookup(A2,A:Z,2,False)
A3 =Vlookup(A3,A:Z,2,False)
A4 =Vlookup(A4,A:Z,2,False)

The reason why I am asking this, is because my goal is to put a vlookup on every other line in one specific column. However, there are subtotals in the way. That is why I can't copy and paste the formula, because it will override my subtotal (sum) formula.

Thank you in advance
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
What column are the (possibly) empty cells in? How many rows are in column A, and can this vary?
 
Upvote 0
You can highlight the entire column where the formulas will go
Press CTRL + G
Click Special
Select Blanks
Click OK

Type the formula as it should appear in the FIRST highlighted cell from previous step DO NOT PRESS ENTER
Press CTRL + ENTER

Hope that helps.
 
Upvote 0

@d3skjet - thanks for your reply.

What column are the (possibly) empty cells in?

Columns - there are 4 or 5 columns depending on the file.
How many rows are in column A, and can this vary?
There are over 2000 rows in Column A, and this may vary.
 
Upvote 0
Hi Jonmo1

Thank you for your reply. Unfortunately, this did not work. Am I doing something wrong here? I have Excel 2010.
 
Upvote 0
On another Jonmo1, the formula appeared on the unhighlighted cells.
I want this to apply on the HIGHLIGHTED cells.

Maybe I am doing something wrong. hmmm
 
Upvote 0
Can you describe "did not work" ?
What exactly happened when you tried it?

Are your blanks not really blank, but formulas returning "" ?
 
Upvote 0
It put formulas in both the highlighted cells, and non-highlighted cells.

I only wanted it for Highlighted cells.

Thank you in advance!
 
Upvote 0
Just to clarify...

Highlighted Cells are blank/empty
NON-Highlighted cells contain a Subtotal
You want to put the vlookup in the Highlighted/blank/empty cells

Right?

The steps I posted will do that.
Make sure you're selecting Blanks after clicking Special.
 
Upvote 0
[TABLE="width: 540"]
<colgroup><col><col span="4"></colgroup><tbody>[TR]
[TD] input vlookup formula [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[/TR]
[TR]
[TD] blank [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] Subtotal [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]1 thing[/TD]
[/TR]
[TR]
[TD] blank [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] blank [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] blank [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] input vlookup formula [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[/TR]
[TR]
[TD] blank [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] input vlookup formula [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[/TR]
[TR]
[TD] blank [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] Subtotal [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]2 things[/TD]
[/TR]
[TR]
[TD] blank [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] blank [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] blank [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] input vlookup formula [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[/TR]
[TR]
[TD] blank [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] input vlookup formula [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[/TR]
[TR]
[TD] blank [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] input vlookup formula [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[/TR]
[TR]
[TD] blank [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] Subtotal [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]3 things[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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