View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
[email protected] ljgibbons@gmail.com is offline
external usenet poster
 
Posts: 2
Default Using a variable in a formula

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?