Using a variable in a formula

  • Thread starter Thread starter ljgibbons
  • Start date Start date
L

ljgibbons

Hi,

I am trying to use a range variable in a formula for a cell.
The code i have currently is:

rct = Selection.CurrentRegion.Rows.Count + 3
Range("e" & rct + 1).Formula = "=sum("e5:e" & rct)"

The rows would vary depending on sheets used.
Is this possible?
 

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

Similar Threads


Back
Top