View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Using a range object inside a formula

Hi,

I'm a bit confused by the question but how about this for a start. All one
line

Range("C10").Formula = "=sum(" & Range("f8:" &
Range("f8").End(xlToRight).Address).Resize(3).Addr ess & ")"
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Café" wrote:

Hello, how would I go about this:

Range("F8").Activate
Selection.End(xlToRight).Select
ActiveCell.Offset(2, 0).Select
Range("F10", Selection).Select
Dim rge As Range
Set rge = Selection
Range("C10").FormulaR1C1 = "=sum(" & rge & ")"

Thats the concept of what I want to do. How do I fix it? I want to do this
since the range is not always the same. The range selection and object is
good.