Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
dazman
 
Posts: n/a
Default Stop Insert Row modifying formula data


I have a worksheet that grabs stock information via web queries. It
always writes today’s information at the top of the page and to do this
it I insert a row using VBA and set the cells to the correct values.

The problem is that I have a number of other worksheets using the data
from this stock information worksheet via lookups. And the insert row
automatically alters their formulas from something like this:

=VLOOKUP(A3,'Historical Funds'!$B$4:$C$3000,2,FALSE)
To this
=VLOOKUP(A3,'Historical Funds'!$B$5:$C$3001,2,FALSE)

Which causes a problem as then all my lookups miss the top line of my
array definitions. Any tips on how I can stop this?


--
dazman
------------------------------------------------------------------------
dazman's Profile: http://www.excelforum.com/member.php...o&userid=25903
View this thread: http://www.excelforum.com/showthread...hreadid=393690

  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

One way

=VLOOKUP(A3,INDIRECT("'Historical Funds'!$B$4:$C$3000"),2,FALSE)

will always point to the same range, note that the workbook has to be open
or else you'll get a ref error

--
Regards,

Peo Sjoblom

(No private emails please)


"dazman" wrote in
message ...

I have a worksheet that grabs stock information via web queries. It
always writes today's information at the top of the page and to do this
it I insert a row using VBA and set the cells to the correct values.

The problem is that I have a number of other worksheets using the data
from this stock information worksheet via lookups. And the insert row
automatically alters their formulas from something like this:

=VLOOKUP(A3,'Historical Funds'!$B$4:$C$3000,2,FALSE)
To this
=VLOOKUP(A3,'Historical Funds'!$B$5:$C$3001,2,FALSE)

Which causes a problem as then all my lookups miss the top line of my
array definitions. Any tips on how I can stop this?


--
dazman
------------------------------------------------------------------------
dazman's Profile:
http://www.excelforum.com/member.php...o&userid=25903
View this thread: http://www.excelforum.com/showthread...hreadid=393690


  #3   Report Post  
Ragdyer
 
Posts: n/a
Default

I read the OP a little differently then you do Peo.

I believe that when he said he misses the "top line", he wanted the range to
*expand* with each row insertion.

This anchors the "top" reference, and allows the range to expand downward:

=VLOOKUP(A3,INDIRECT("'Historical Funds'!$B$4"):'Historical
Funds'!$C$3001,2,FALSE)
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"Peo Sjoblom" wrote in message
...
One way

=VLOOKUP(A3,INDIRECT("'Historical Funds'!$B$4:$C$3000"),2,FALSE)

will always point to the same range, note that the workbook has to be open
or else you'll get a ref error

--
Regards,

Peo Sjoblom

(No private emails please)


"dazman" wrote in
message ...

I have a worksheet that grabs stock information via web queries. It
always writes today's information at the top of the page and to do this
it I insert a row using VBA and set the cells to the correct values.

The problem is that I have a number of other worksheets using the data
from this stock information worksheet via lookups. And the insert row
automatically alters their formulas from something like this:

=VLOOKUP(A3,'Historical Funds'!$B$4:$C$3000,2,FALSE)
To this
=VLOOKUP(A3,'Historical Funds'!$B$5:$C$3001,2,FALSE)

Which causes a problem as then all my lookups miss the top line of my
array definitions. Any tips on how I can stop this?


--
dazman
------------------------------------------------------------------------
dazman's Profile:
http://www.excelforum.com/member.php...o&userid=25903
View this thread:

http://www.excelforum.com/showthread...hreadid=393690



  #4   Report Post  
Biff
 
Posts: n/a
Default

Why not just use a dynamic named range?

Biff

"Ragdyer" wrote in message
...
I read the OP a little differently then you do Peo.

I believe that when he said he misses the "top line", he wanted the range
to
*expand* with each row insertion.

This anchors the "top" reference, and allows the range to expand downward:

=VLOOKUP(A3,INDIRECT("'Historical Funds'!$B$4"):'Historical
Funds'!$C$3001,2,FALSE)
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"Peo Sjoblom" wrote in message
...
One way

=VLOOKUP(A3,INDIRECT("'Historical Funds'!$B$4:$C$3000"),2,FALSE)

will always point to the same range, note that the workbook has to be
open
or else you'll get a ref error

--
Regards,

Peo Sjoblom

(No private emails please)


"dazman" wrote in
message ...

I have a worksheet that grabs stock information via web queries. It
always writes today's information at the top of the page and to do this
it I insert a row using VBA and set the cells to the correct values.

The problem is that I have a number of other worksheets using the data
from this stock information worksheet via lookups. And the insert row
automatically alters their formulas from something like this:

=VLOOKUP(A3,'Historical Funds'!$B$4:$C$3000,2,FALSE)
To this
=VLOOKUP(A3,'Historical Funds'!$B$5:$C$3001,2,FALSE)

Which causes a problem as then all my lookups miss the top line of my
array definitions. Any tips on how I can stop this?


--
dazman
------------------------------------------------------------------------
dazman's Profile:
http://www.excelforum.com/member.php...o&userid=25903
View this thread:

http://www.excelforum.com/showthread...hreadid=393690





  #5   Report Post  
Ragdyer
 
Posts: n/a
Default

Probably because it's easier (for me), to suggest a single formula.<bg

Lot more typing to describe how to create one (dynamic range), and the
results are the same.

Welllllll, almost the same.

The Indirect() formula is a little more robust, taking the possibility of
blank rows into consideration.
--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Biff" wrote in message
...
Why not just use a dynamic named range?

Biff

"Ragdyer" wrote in message
...
I read the OP a little differently then you do Peo.

I believe that when he said he misses the "top line", he wanted the

range
to
*expand* with each row insertion.

This anchors the "top" reference, and allows the range to expand

downward:

=VLOOKUP(A3,INDIRECT("'Historical Funds'!$B$4"):'Historical
Funds'!$C$3001,2,FALSE)
--
HTH,

RD


--------------------------------------------------------------------------

-
Please keep all correspondence within the NewsGroup, so all may benefit

!

--------------------------------------------------------------------------

-

"Peo Sjoblom" wrote in message
...
One way

=VLOOKUP(A3,INDIRECT("'Historical Funds'!$B$4:$C$3000"),2,FALSE)

will always point to the same range, note that the workbook has to be
open
or else you'll get a ref error

--
Regards,

Peo Sjoblom

(No private emails please)


"dazman" wrote in
message ...

I have a worksheet that grabs stock information via web queries. It
always writes today's information at the top of the page and to do

this
it I insert a row using VBA and set the cells to the correct values.

The problem is that I have a number of other worksheets using the

data
from this stock information worksheet via lookups. And the insert row
automatically alters their formulas from something like this:

=VLOOKUP(A3,'Historical Funds'!$B$4:$C$3000,2,FALSE)
To this
=VLOOKUP(A3,'Historical Funds'!$B$5:$C$3001,2,FALSE)

Which causes a problem as then all my lookups miss the top line of my
array definitions. Any tips on how I can stop this?


--
dazman

------------------------------------------------------------------------
dazman's Profile:
http://www.excelforum.com/member.php...o&userid=25903
View this thread:

http://www.excelforum.com/showthread...hreadid=393690








  #6   Report Post  
dazman
 
Posts: n/a
Default


Thanks for the replies - Sorted now!


--
dazman
------------------------------------------------------------------------
dazman's Profile: http://www.excelforum.com/member.php...o&userid=25903
View this thread: http://www.excelforum.com/showthread...hreadid=393690

  #7   Report Post  
RagDyer
 
Posts: n/a
Default

I usually say "Thanks For The Feed-back",
BUT ...
Your feed-back is lacking in *exactly* what you used to "get it sorted".<bg
--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"dazman" wrote in
message ...

Thanks for the replies - Sorted now!


--
dazman
------------------------------------------------------------------------
dazman's Profile:

http://www.excelforum.com/member.php...o&userid=25903
View this thread: http://www.excelforum.com/showthread...hreadid=393690


  #8   Report Post  
dazman
 
Posts: n/a
Default


Hi RagDyer

I ended up only needing the syntax to anchor the "top" reference in
this instance because I can change the range with my VBA code. However
after reading about the INDIRECT procedure I have used it a few time
since in my forulas for this reason.

Thanks!
Daz


--
dazman
------------------------------------------------------------------------
dazman's Profile: http://www.excelforum.com/member.php...o&userid=25903
View this thread: http://www.excelforum.com/showthread...hreadid=393690

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
Sort pages? David Excel Discussion (Misc queries) 15 May 13th 05 11:33 PM
trying to create an (almost) circular formula between cells and data validated cells with lists KR Excel Worksheet Functions 0 May 12th 05 07:21 PM
Pivot table, dynamic data formula Excel GuRu Excel Discussion (Misc queries) 3 May 3rd 05 10:45 PM
Import Data: on insert, shift data down and not right Raminhos Excel Discussion (Misc queries) 1 February 17th 05 02:08 PM
formula to determine the first column containing any data sd Excel Worksheet Functions 5 November 9th 04 08:06 PM


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

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"