ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Change the Range refering to a Name (https://www.excelbanter.com/excel-discussion-misc-queries/96273-change-range-refering-name.html)

TonTon165

Change the Range refering to a Name
 
I have a userform and after inserting data need to update the range that is
defined to a range name(say from A1:A84 to A1:85, and so on) so that I can
see the new data in a pull down list I use. How can I do this using VBA?

JonR

Change the Range refering to a Name
 
Take a look at Jon Peltier's site on Dynamic Charts. He details the steps
you need to take to create a dynamic named range, which will expand or
contract depending on the amount of data in the column. You can probably
adapt this to your purposes.

http://peltiertech.com/Excel/Charts/index.html#hdrDyno



"TonTon165" wrote:

I have a userform and after inserting data need to update the range that is
defined to a range name(say from A1:A84 to A1:85, and so on) so that I can
see the new data in a pull down list I use. How can I do this using VBA?


TonTon165

Change the Range refering to a Name
 
Thanks, it seems to have worked

"JonR" wrote:

Take a look at Jon Peltier's site on Dynamic Charts. He details the steps
you need to take to create a dynamic named range, which will expand or
contract depending on the amount of data in the column. You can probably
adapt this to your purposes.

http://peltiertech.com/Excel/Charts/index.html#hdrDyno



"TonTon165" wrote:

I have a userform and after inserting data need to update the range that is
defined to a range name(say from A1:A84 to A1:85, and so on) so that I can
see the new data in a pull down list I use. How can I do this using VBA?



All times are GMT +1. The time now is 12:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com