Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default dynamic ranges getting invalidated

Hi,
I developed an excel sheet where I track my stocks, In this sheet I have
a dynamic range defined like this

StockSymbols =OFFSET(Main!$A$10,0,0,COUNTA(Main!$A$10:$A$35),1)

In my vba code I need to delete a row when I no longer own that stock, so I
delete the row in my vba code. If I delete the first row A10 then
this range is getting invalidated and the range becomes

=OFFSET(Main!#REF!,0,0,COUNTA(Main!$A$10:$A$35),1)

I want to know how to fix this problem, are there any better solutions that
I can use.

Thanks
Ravi








  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default dynamic ranges getting invalidated

Hi,

this is untested, and seems a strange workaround but try
StockSymbol
=OFFSET(indirect("Main!$A$10",0,0,COUNTA(indirect( "Main!$A$10:$A$35"),1)


HI

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default dynamic ranges getting invalidated

The easiest way would probably be to use this as the definition of
StockSymbols:

=OFFSET(Main!$A$9,1,0,COUNTA(Main!$A$10:$A$35),1)

In article ,
"rtos" wrote:

Hi,
I developed an excel sheet where I track my stocks, In this sheet I have
a dynamic range defined like this

StockSymbols =OFFSET(Main!$A$10,0,0,COUNTA(Main!$A$10:$A$35),1)

In my vba code I need to delete a row when I no longer own that stock, so I
delete the row in my vba code. If I delete the first row A10 then
this range is getting invalidated and the range becomes

=OFFSET(Main!#REF!,0,0,COUNTA(Main!$A$10:$A$35),1)

I want to know how to fix this problem, are there any better solutions that
I can use.

Thanks
Ravi






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
Digital signatures in workflow constantly get invalidated! Deinonychus007 Excel Discussion (Misc queries) 2 May 25th 12 07:53 PM
Digital signatures constantly getting invalidated Deinonychus007 Excel Discussion (Misc queries) 0 April 21st 09 09:32 PM
Dynamic Ranges JackR Excel Discussion (Misc queries) 2 February 23rd 06 06:25 PM
Dynamic Ranges ACase Excel Discussion (Misc queries) 4 March 26th 05 10:16 PM
Dynamic Formulas with Dynamic Ranges Ralph Howarth Excel Worksheet Functions 5 January 21st 05 08:44 AM


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

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

About Us

"It's about Microsoft Excel"