Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default changing a vlookup formula using a macro

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 364
Default changing a vlookup formula using a macro

"Arain" wrote in message
...
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.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default changing a vlookup formula using a macro

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


"Arain" wrote in message
...
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


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 94
Default changing a vlookup formula using a macro

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.


"Arain" wrote in message
...
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



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default changing a vlookup formula using a macro

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

"Stephen" wrote:

"Arain" wrote in message
...
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.





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default changing a vlookup formula using a macro


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


"Rick Rothstein (MVP - VB)" wrote:

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


"Arain" wrote in message
...
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



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 94
Default changing a vlookup formula using a macro

Select the second column, then use Edit,Replace to change May to June.


"Arain" wrote in message
...

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


"Rick Rothstein (MVP - VB)" wrote:

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


"Arain" wrote in message
...
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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VLOOKUP anchored cell reference changing when macro runs questor Excel Discussion (Misc queries) 2 September 14th 07 05:48 PM
Automation Macro for updating formula when changing cell value Danny Excel Discussion (Misc queries) 2 August 17th 07 02:22 AM
copying VLOOKUP w/o changing formula rldjda Excel Worksheet Functions 2 February 7th 07 02:07 AM
How do I set up a formula with a changing range in an excel macro cinvic Excel Discussion (Misc queries) 2 April 4th 06 10:39 PM
Changing a chart scale using a formula/macro Doug Charts and Charting in Excel 2 August 10th 05 10:45 PM


All times are GMT +1. The time now is 03:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"