Named Ranges

  • Thread starter Thread starter Guitar Billy
  • Start date Start date
G

Guitar Billy

I am trying to use VB to enter TREND functions into my worksheet. This
works OK if I use code similar to the following,

ActiveSheet.Range(Cells(7, 9), Cells(7, 13)).Select
Selection.FormulaArray = _

"=TREND(R[-4]C[-7]:R[-4]C[-1],R[-6]C[-7]:R[-6]C[-1],R[-6]C:R[-6]C[4])"

or
Range("L26:P26").Select
Selection.FormulaArray =
"=TREND(TestRange1,Testrange2,TestRange3)"


but I want to be able to change the ranges as required.
Q1.. Can I use variables in these lines or
Q2.. Can I create Named Ranges using variables.

Thanks in anticipation
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top