![]() |
Updating a Named range Automatically
I was hoping that someone could give me some direction.
I have a named range that I want to expand as the user adds more records. The records will be added one or two at a time over a span of months. I use the named range in a cobo-box on a user form. I will eventually be using the user selection to match back to records in the file (although a different worksheet) Is there an easy way to automatically update the named range every time I run the macro? I don't have any coding to share yet, although I am working through it. Thanks for any help. Rob |
Updating a Named range Automatically
Make the named range dynamic
eg =A1:offset(a1,counta(a:a)-1,0) would give you all records in column A |
Updating a Named range Automatically
Aidan,
Thanks for the assistance. When I make the named range dynamic though, it is just selecting a huge range, not what I am looking for. I want to select 2 columns and right now 30 rows starting at G5... so G5:H35 (that's how the range is defined now). I will want the rnage to be defined from G5 until G has no values in it. i.e. the named range will stop if the column G and row X is null. Thanks, Rob |
Updating a Named range Automatically
|
Updating a Named range Automatically
I have the named range working and automatically updating, but the
updating doesn't occur in the macro. I make a change to increase the size of the named range, but the combo box that is referencing the named range doesn't include the changes. The only way that I can make it update seems to be if I select the combo box and then select the Row Source location.. I can then save the userForm and run it, and the list is complete again. I need to be able to automatically update this, as I don't want users not seeing the newly added names to the named range. Thanks, Rob |
Updating a Named range Automatically
I'm assuming that the macro updates the data in the range, so at this
point it can reference the combobox - with another one of the bits of code that looks a bit silly - ComboBox1.RowSource = ComboBox1.RowSource this will cause the data to refresh. |
All times are GMT +1. The time now is 01:50 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com