Thread: dyanmic range
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
John Wilson John Wilson is offline
external usenet poster
 
Posts: 550
Default dyanmic range

Steve,

This should work:

range(range("A1"), range("A1").End(xlDown).Resize(,4)).Select

John

"Steve" wrote in message
...
I am trying to plot a graph in VBA using a selected range.
However I only want the range to incorporate column A and D, which will
expand over time.

How Can I express the following so that the range updates dynamically when
new rows are entered?
Range("A1:A23,D1:D23").Select

Tried this, but does not work at all:
Range(Range("A1").End(xlDown), Range("D1").End(xlDown)).Select

Thank you.