View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Building a Macro for different size trend-Charts??

Anthony,

It would help if you posted your code.

But, generally, if you get code like

Range("A2:D10")

you can change that to

Range("A2:D" & Cells(Rows.Count,4).End(xlUp).Row)

OR

Range("A2").CurrentRegion (but this depends on layout with headers etc)

OR

Range("A2", Range("A2").End(xlDown).End(xlToRight))

The best solution depends on your layout.

HTH,
Bernie
MS Excel MVP


"Anthony0247" wrote in message
...
Hello everyone, I need help. (who doesn't, lol)

I am trying to build a macro to
create real estate trend charts/graphs. I need to work with different
amounts
of data every time; however, the column layout is the same everytime.
I recorded a basic marco, but it messes up when I have different
amounts
of sales to graph. I am self taught and I need someone
to open my eyes a little further. Any help would be greatly
appreciated.


Anthony.