Thread: Range - Formula
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sheeloo Sheeloo is offline
external usenet poster
 
Posts: 793
Default Range - Formula

Try
Range("D10:D20").Select
Selection.Formula = "=SUM(A1+A2)"

Use SUM($A$! + $A$2) if you want Sum(A1+A2) in all cells and not Sum(A2+A3)
and so on

" VLOOKUP fORMULA" wrote:

I am sorry Sheeloo, I was asking for a code

In the below code I have to apply the formula in D10
Range("Range1").FillDown


I was trying to enter a forumla =sum(a1+a2) in all cells (D10:D20) without
applying a formula manually in D10.



"Sheeloo" wrote:

Not sure what you want but try this;
type your name in the address box on the top-left and press enter
this will select the named range
type your formula and then press CTRL-ENTER ... your formula will be copied
to all cells in the range.



" VLOOKUP fORMULA" wrote:

Any one please help me......?

Is there any way to give a formula to a named range.
for example:-

I have given a name Range1 for D10:D20
I need to give a formula <a1+a2
and copy the formula to D10:D20

Tks