A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Formulas



 
 
Thread Tools Display Modes
  #1  
Old November 20th, 2007, 11:01 PM posted to microsoft.public.excel.misc
Copying VLOOKUP formulas
external usenet poster
 
Posts: 1
Default Formulas

I have the following formula inserted into a cell. I know it works because
it returns the correct value.

=VLOOKUP(K4,A3:C714,3,FALSE)

I now need to copy this same formula in the same column over about 700 rows
of data. The "K4" will obviously change since that's the value I'm looking
for, but how do I lock the range table, i.e. "A3:C714", so it won't increase
when I copy the formulas down? Also, is there something I need to do in
Paste Special to make the formula work in the other rows? I've tried
everything and I can't get the formula to copy correctly. I obviously don't
want to retype it 700 times.

Any help would be GREATLY appreciated.
  #2  
Old November 20th, 2007, 11:06 PM posted to microsoft.public.excel.misc
Elkar
external usenet poster
 
Posts: 940
Default Formulas

Use absolute cell referencing. Like this:

=VLOOKUP(K4,$A$3:$C$714,3,FALSE)

The $ symbol locks the cell reference so that it won't increment when copied.

$A3 would lock just the column
A$3 would lock just the row
$A$3 locks both row and column

HTH,
Elkar


"Copying VLOOKUP formulas" wrote:

I have the following formula inserted into a cell. I know it works because
it returns the correct value.

=VLOOKUP(K4,A3:C714,3,FALSE)

I now need to copy this same formula in the same column over about 700 rows
of data. The "K4" will obviously change since that's the value I'm looking
for, but how do I lock the range table, i.e. "A3:C714", so it won't increase
when I copy the formulas down? Also, is there something I need to do in
Paste Special to make the formula work in the other rows? I've tried
everything and I can't get the formula to copy correctly. I obviously don't
want to retype it 700 times.

Any help would be GREATLY appreciated.

  #3  
Old November 20th, 2007, 11:06 PM posted to microsoft.public.excel.misc
Gary''s Student
external usenet poster
 
Posts: 7,584
Default Formulas

replace your form with:

=VLOOKUP(K4,$A$3:$C$714,3,FALSE)

now the K4 will change, but the lookup table will not
--
Gary''s Student - gsnu200757


"Copying VLOOKUP formulas" wrote:

I have the following formula inserted into a cell. I know it works because
it returns the correct value.

=VLOOKUP(K4,A3:C714,3,FALSE)

I now need to copy this same formula in the same column over about 700 rows
of data. The "K4" will obviously change since that's the value I'm looking
for, but how do I lock the range table, i.e. "A3:C714", so it won't increase
when I copy the formulas down? Also, is there something I need to do in
Paste Special to make the formula work in the other rows? I've tried
everything and I can't get the formula to copy correctly. I obviously don't
want to retype it 700 times.

Any help would be GREATLY appreciated.

  #4  
Old November 20th, 2007, 11:17 PM posted to microsoft.public.excel.misc
Dave Peterson
external usenet poster
 
Posts: 19,791
Default Formulas

=VLOOKUP(K4,$A$3:$C$714,3,FALSE)

The $ fixes that range so that the address (either row or column or both) won't
change when you copy that formula.



Copying VLOOKUP formulas wrote:

I have the following formula inserted into a cell. I know it works because
it returns the correct value.

=VLOOKUP(K4,A3:C714,3,FALSE)

I now need to copy this same formula in the same column over about 700 rows
of data. The "K4" will obviously change since that's the value I'm looking
for, but how do I lock the range table, i.e. "A3:C714", so it won't increase
when I copy the formulas down? Also, is there something I need to do in
Paste Special to make the formula work in the other rows? I've tried
everything and I can't get the formula to copy correctly. I obviously don't
want to retype it 700 times.

Any help would be GREATLY appreciated.


--

Dave Peterson
  #5  
Old November 20th, 2007, 11:29 PM posted to microsoft.public.excel.misc
Copying VLOOKUP formulas[_2_]
external usenet poster
 
Posts: 3
Default Formulas

That worked great...with one exception. When I click the bottom left corner
of the cell and drag it down the column, the formula copies correctly but the
returned value is incorrect. The formula copies correctly but it won't
return the correct value unless I click on the formula bar and then hit
enter. I don't have to change anything in the formula itself, just
highlighting the formula bar and then hitting ENTER corrects the returned
value. Any trick to doing that all at once?

"Gary''s Student" wrote:

replace your form with:

=VLOOKUP(K4,$A$3:$C$714,3,FALSE)

now the K4 will change, but the lookup table will not
--
Gary''s Student - gsnu200757


"Copying VLOOKUP formulas" wrote:

I have the following formula inserted into a cell. I know it works because
it returns the correct value.

=VLOOKUP(K4,A3:C714,3,FALSE)

I now need to copy this same formula in the same column over about 700 rows
of data. The "K4" will obviously change since that's the value I'm looking
for, but how do I lock the range table, i.e. "A3:C714", so it won't increase
when I copy the formulas down? Also, is there something I need to do in
Paste Special to make the formula work in the other rows? I've tried
everything and I can't get the formula to copy correctly. I obviously don't
want to retype it 700 times.

Any help would be GREATLY appreciated.

  #6  
Old November 20th, 2007, 11:35 PM posted to microsoft.public.excel.misc
Jim Thomlinson
external usenet poster
 
Posts: 2,641
Default Formulas

Your calculation is probably set to manual. Tools |Options |Calculation
(Check Automatic)...

F9 will do a one time calc for you...
--
HTH...

Jim Thomlinson


"Copying VLOOKUP formulas" wrote:

That worked great...with one exception. When I click the bottom left corner
of the cell and drag it down the column, the formula copies correctly but the
returned value is incorrect. The formula copies correctly but it won't
return the correct value unless I click on the formula bar and then hit
enter. I don't have to change anything in the formula itself, just
highlighting the formula bar and then hitting ENTER corrects the returned
value. Any trick to doing that all at once?

"Gary''s Student" wrote:

replace your form with:

=VLOOKUP(K4,$A$3:$C$714,3,FALSE)

now the K4 will change, but the lookup table will not
--
Gary''s Student - gsnu200757


"Copying VLOOKUP formulas" wrote:

I have the following formula inserted into a cell. I know it works because
it returns the correct value.

=VLOOKUP(K4,A3:C714,3,FALSE)

I now need to copy this same formula in the same column over about 700 rows
of data. The "K4" will obviously change since that's the value I'm looking
for, but how do I lock the range table, i.e. "A3:C714", so it won't increase
when I copy the formulas down? Also, is there something I need to do in
Paste Special to make the formula work in the other rows? I've tried
everything and I can't get the formula to copy correctly. I obviously don't
want to retype it 700 times.

Any help would be GREATLY appreciated.

  #7  
Old November 20th, 2007, 11:40 PM posted to microsoft.public.excel.misc
pulling my hair out
external usenet poster
 
Posts: 11
Default Formulas

Is there a way to get the cell # that you want to return data from to change
as you copy it across several columns? (i.e. ",3,false) ,4, false) .5,false))

"Dave Peterson" wrote:

=VLOOKUP(K4,$A$3:$C$714,3,FALSE)

The $ fixes that range so that the address (either row or column or both) won't
change when you copy that formula.



Copying VLOOKUP formulas wrote:

I have the following formula inserted into a cell. I know it works because
it returns the correct value.

=VLOOKUP(K4,A3:C714,3,FALSE)

I now need to copy this same formula in the same column over about 700 rows
of data. The "K4" will obviously change since that's the value I'm looking
for, but how do I lock the range table, i.e. "A3:C714", so it won't increase
when I copy the formulas down? Also, is there something I need to do in
Paste Special to make the formula work in the other rows? I've tried
everything and I can't get the formula to copy correctly. I obviously don't
want to retype it 700 times.

Any help would be GREATLY appreciated.


--

Dave Peterson

  #8  
Old November 20th, 2007, 11:51 PM posted to microsoft.public.excel.misc
Jim Thomlinson
external usenet poster
 
Posts: 2,641
Default Formulas

You can use the Row() function for that...

=VLOOKUP(K4,$A$3:$C$714,Row() - 1,FALSE)

Note that this makes the function volatile though which could negatively
effect performance...
--
HTH...

Jim Thomlinson


"pulling my hair out" wrote:

Is there a way to get the cell # that you want to return data from to change
as you copy it across several columns? (i.e. ",3,false) ,4, false) .5,false))

"Dave Peterson" wrote:

=VLOOKUP(K4,$A$3:$C$714,3,FALSE)

The $ fixes that range so that the address (either row or column or both) won't
change when you copy that formula.



Copying VLOOKUP formulas wrote:

I have the following formula inserted into a cell. I know it works because
it returns the correct value.

=VLOOKUP(K4,A3:C714,3,FALSE)

I now need to copy this same formula in the same column over about 700 rows
of data. The "K4" will obviously change since that's the value I'm looking
for, but how do I lock the range table, i.e. "A3:C714", so it won't increase
when I copy the formulas down? Also, is there something I need to do in
Paste Special to make the formula work in the other rows? I've tried
everything and I can't get the formula to copy correctly. I obviously don't
want to retype it 700 times.

Any help would be GREATLY appreciated.


--

Dave Peterson

  #9  
Old November 20th, 2007, 11:55 PM posted to microsoft.public.excel.misc
Elkar
external usenet poster
 
Posts: 940
Default Formulas

Actually, if copying across columns, you'd want to use the COLUMN() function
rather than ROW().

COLUMN(C:C) would return a value of 3 (since C is the third column). When
copied to the right, C:C would increment to D and thus return 4, etc...

HTH,
Elkar


"Jim Thomlinson" wrote:

You can use the Row() function for that...

=VLOOKUP(K4,$A$3:$C$714,Row() - 1,FALSE)

Note that this makes the function volatile though which could negatively
effect performance...
--
HTH...

Jim Thomlinson


"pulling my hair out" wrote:

Is there a way to get the cell # that you want to return data from to change
as you copy it across several columns? (i.e. ",3,false) ,4, false) .5,false))

"Dave Peterson" wrote:

=VLOOKUP(K4,$A$3:$C$714,3,FALSE)

The $ fixes that range so that the address (either row or column or both) won't
change when you copy that formula.



Copying VLOOKUP formulas wrote:

I have the following formula inserted into a cell. I know it works because
it returns the correct value.

=VLOOKUP(K4,A3:C714,3,FALSE)

I now need to copy this same formula in the same column over about 700 rows
of data. The "K4" will obviously change since that's the value I'm looking
for, but how do I lock the range table, i.e. "A3:C714", so it won't increase
when I copy the formulas down? Also, is there something I need to do in
Paste Special to make the formula work in the other rows? I've tried
everything and I can't get the formula to copy correctly. I obviously don't
want to retype it 700 times.

Any help would be GREATLY appreciated.

--

Dave Peterson

  #10  
Old November 21st, 2007, 12:00 AM posted to microsoft.public.excel.misc
Jim Thomlinson
external usenet poster
 
Posts: 2,641
Default Formulas

Ooops. I was thinking about the first post where the op was copying down
rows... My Bad. Thanks for catching that...

To avoid the performance hit associated with column() and row() functions
(volatile) you might consider just putting the number you want into a cell
and dragging it to increment the value. You can then just (relative)
reference the cell.
--
HTH...

Jim Thomlinson


"Elkar" wrote:

Actually, if copying across columns, you'd want to use the COLUMN() function
rather than ROW().

COLUMN(C:C) would return a value of 3 (since C is the third column). When
copied to the right, C:C would increment to D and thus return 4, etc...

HTH,
Elkar


"Jim Thomlinson" wrote:

You can use the Row() function for that...

=VLOOKUP(K4,$A$3:$C$714,Row() - 1,FALSE)

Note that this makes the function volatile though which could negatively
effect performance...
--
HTH...

Jim Thomlinson


"pulling my hair out" wrote:

Is there a way to get the cell # that you want to return data from to change
as you copy it across several columns? (i.e. ",3,false) ,4, false) .5,false))

"Dave Peterson" wrote:

=VLOOKUP(K4,$A$3:$C$714,3,FALSE)

The $ fixes that range so that the address (either row or column or both) won't
change when you copy that formula.



Copying VLOOKUP formulas wrote:

I have the following formula inserted into a cell. I know it works because
it returns the correct value.

=VLOOKUP(K4,A3:C714,3,FALSE)

I now need to copy this same formula in the same column over about 700 rows
of data. The "K4" will obviously change since that's the value I'm looking
for, but how do I lock the range table, i.e. "A3:C714", so it won't increase
when I copy the formulas down? Also, is there something I need to do in
Paste Special to make the formula work in the other rows? I've tried
everything and I can't get the formula to copy correctly. I obviously don't
want to retype it 700 times.

Any help would be GREATLY appreciated.

--

Dave Peterson

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:15 PM.


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