Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default how to create farmula in excle programming

how to create farmula in excle programming
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default how to create farmula in excle programming

You mean:
Range("A1").Formula = "=SUM(A2:A14)"

NickHK

"Ajaynagpur" wrote in message
...
how to create farmula in excle programming



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default how to create farmula in excle programming

If the cell or/and range is a variable, how to handle then?

Thanks at advance,
Viesta

"NickHK" wrote:

You mean:
Range("A1").Formula = "=SUM(A2:A14)"

NickHK

"Ajaynagpur" wrote in message
...
how to create farmula in excle programming




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default how to create farmula in excle programming

Like this you mean:
Dim varRow As Variant
Dim varColumn As Variant
varRow = 15
varColumn = 25
Cells(varRow , varColumn ).Formula = "=..."
'Or
varColumn = "AB"
Range("a" & RowNumber & ":" & varColumn & "30").Formula = "=..."

NickHK

"ViestaWu" wrote in message
...
If the cell or/and range is a variable, how to handle then?

Thanks at advance,
Viesta

"NickHK" wrote:

You mean:
Range("A1").Formula = "=SUM(A2:A14)"

NickHK

"Ajaynagpur" wrote in message
...
how to create farmula in excle programming






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default how to create farmula in excle programming

If it is the range to be summed that is variable, it would be situation
specific, but here is an example of one possible scenario for Sum.

set rng = range(Range("A1"),range("A1").end(xldown))
rng(rng.rows.count + 2).formula = "=Sum(" & rng.Address(1,1) & ")"

This puts a sum two rows below the last contiguous entry and sums the values
above.

--
regards,
Tom Ogilvy


"ViestaWu" wrote:

If the cell or/and range is a variable, how to handle then?

Thanks at advance,
Viesta

"NickHK" wrote:

You mean:
Range("A1").Formula = "=SUM(A2:A14)"

NickHK

"Ajaynagpur" wrote in message
...
how to create farmula in excle programming




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to put farmula M M IMRAN New Users to Excel 3 February 6th 10 01:37 AM
Help with Excle Formula Dave Eade Excel Discussion (Misc queries) 11 August 29th 08 04:08 PM
average in excle [email protected] Excel Worksheet Functions 10 July 16th 07 11:57 PM
Farmula wrong result saleem Excel Discussion (Misc queries) 1 March 13th 07 11:55 AM
help in excle setting neelkamalgupta New Users to Excel 1 February 13th 06 08:57 PM


All times are GMT +1. The time now is 06:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"