LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Macro needs updated Range name addresses

The range name "Current" needs to be a moving target so that when
something gets added at the bottom, the range updates itself. I tried
dynamic ranges with =offset and that did not pan out. This range is
used so that we can filter out rows with zeros in a certain column,
which is what the range "criteria" is for. The problem with this macro
right now is that I cannot properly assign the variable range1 to the
range name "Current" given that this range name does exist, it just
needs to be updated.

I have experimented with quite a few commands but right now look on
the 6th line down starting with
ActiveWorkbook.Names.Add Name:="Current" = Selection

Obviously that statement doesn't work or I would not be here typing
this right now.

Sub HideZeros()
Dim range1 As range
Application.Goto Reference:=range("start").Offset(1, 0)


Set range1 = range(ActiveCell.End(xlDown), ActiveCell.Offset(0, 25))
Application.Goto Reference:=range1

ActiveWorkbook.Names.Add Name:="Current" = Selection

range("Current").AdvancedFilter Action = xlFilterInPlace, _
CriteriaRange:=range("Criteria"), _
Unique:=False


End Sub
 
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
Excel cells randomly don't get updated unless each cell is updated Lost in Excel Excel Discussion (Misc queries) 5 September 29th 08 06:56 PM
RANGE addresses. Getting from other cells. thomas Excel Worksheet Functions 3 July 17th 08 12:18 PM
Sort Data auto on cell range when updated anduare2 Excel Programming 2 January 21st 08 03:30 PM
Select updated data from a range of columns Alylia Excel Worksheet Functions 5 August 30th 05 01:53 PM
Translate range name passed as string to a custom function to range addresses! agarwaldvk[_25_] Excel Programming 3 September 7th 04 12:47 PM


All times are GMT +1. The time now is 02:39 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"