Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default Updating a Named range Automatically

A dynamic range such as this should do EXACTLY what you want, and is
what I use reguarly on (for example) pivot tables that I want to read
from an uncertain data range

it may help to email me and I can send you an example file - my email
is

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default 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.

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
Data Range updating automatically as new data is entered mgnrke28 Charts and Charting in Excel 1 July 10th 08 02:02 PM
automatically update pivot tables when dynamic named range is expa Dave F Excel Discussion (Misc queries) 10 November 23rd 06 01:51 PM
Updating a named range joala Excel Worksheet Functions 2 March 16th 06 06:10 PM
Updating a named range with SQL like command [email protected] Excel Programming 0 October 21st 05 08:50 PM
If any cell in named range = 8 then shade named range JJ[_8_] Excel Programming 3 August 26th 05 11:09 PM


All times are GMT +1. The time now is 04:01 PM.

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"