changing a vlookup formula using a macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I wrote a vlookup formula to look for a value in cell reference of sheet two.
i copy pasted the formul horizontally. later when it was giving n/a i
realized when i copy pasted the vlookup it changed the cell reference from A
to B and the C. Is there a way to fix it without going through each cell and
changing it back to A.

Thanks
 
Arain said:
I wrote a vlookup formula to look for a value in cell reference of sheet
two.
i copy pasted the formul horizontally. later when it was giving n/a i
realized when i copy pasted the vlookup it changed the cell reference from
A
to B and the C. Is there a way to fix it without going through each cell
and
changing it back to A.

Thanks

No need for a macro. Go back to the original cell and change the reference
to absolute (A1 becomes $A$1, or whatever). Then copy/paste this as before,
and the reference will not change to B, C etc.
 
If I understand your question correctly, go back to the first cell where you
pasted the formula, put a $ sign in front of the A and then copy/paste
(easier to put cursor on the small black square in bottom right of cell
border, cursor will turn to a black + sign, and drag) into the other cells
again.

Rick
 
You could go back to the original formula, make the A an absolute reference
(put a $ in front of it) and copy it down again.
 
i have another issue i just came across. the sheet its taking the data also
change i mean the first column looks in sheet name May second column looks in
sheet name June. when i copy paste it copies may all over the place. is
there a way to change it in the formula. its sounds painful to go in and
change the sheet name from may to june for 10000 lines. can someone please
help
 
i have another issue i just came across. the sheet its taking the data also
change i mean the first column looks in sheet name May second column looks in
sheet name June. when i copy paste it copies may all over the place. is
there a way to change it in the formula. its sounds painful to go in and
change the sheet name from may to june for 10000 lines. can someone please
help
 
Select the second column, then use Edit,Replace to change May to June.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top