View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Andrew[_16_] Andrew[_16_] is offline
external usenet poster
 
Posts: 66
Default dynamic range without using OFFSET()

I've seen a number of posts which use the OFFSET() function to create
a dynamic range. This is neat but I thought I could do it better by
using my own function (see below). However, I seem to be unable to
plot this range on a chart in the same way that I could plot a dyn.
range creating using the OFFSET function. Does anyone know why this
is or whether there is a work-around?

Thanks,
Andrew


Public Function DYNRANGEV(FirstCell As Range) As Range
Set DYNRANGEV = FirstCell.Parent.Range(FirstCell.Address & ":" & _
FirstCell.End(xlDown).Address)
End Function