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

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
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
input vlookup formula
blank
Subtotal 1 thing
blank
blank
blank
input vlookup formula
blank
input vlookup formula
blank
Subtotal 2 things
blank
blank
blank
input vlookup formula
blank
input vlookup formula
blank
input vlookup formula
blank
Subtotal 3 things

<colgroup><col><col span="4"></colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,474
Messages
6,125,024
Members
449,204
Latest member
LKN2GO

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