Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Excel formula in VBA

How would I enter the Excel fromula SUM(A1,A3) into a macro. I am getting
confused on the different methods ie, R1C1 etc.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Excel formula in VBA

Maybe

myvalue = WorksheetFunction.Sum(Range("a1:a3"))

Mike

"bgkgmg" wrote:

How would I enter the Excel fromula SUM(A1,A3) into a macro. I am getting
confused on the different methods ie, R1C1 etc.

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Excel formula in VBA

maybe this?
range("C3").Formula = "=sum(A1,A3)"

--


Gary


"bgkgmg" wrote in message
...
How would I enter the Excel fromula SUM(A1,A3) into a macro. I am getting
confused on the different methods ie, R1C1 etc.

Thanks



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
When I enter a formula, Excel shows the formula not the results Pat Adams Excel Worksheet Functions 5 April 4th 23 11:18 AM
Excel 2002 Formula: Urgent Conditional Formula Required Right Away - if possible blue[_2_] Excel Discussion (Misc queries) 2 July 11th 07 06:08 PM
Build excel formula using field values as text in the formula val kilbane Excel Worksheet Functions 2 April 18th 07 01:52 PM
match formula - 2 excel files:#1 hasthis formula, 2nd has the Raw DS Excel Worksheet Functions 4 October 7th 06 12:25 AM
Excel 2002 formula displayed not value formula option not checked Dean Excel Worksheet Functions 1 February 28th 06 02:31 PM


All times are GMT +1. The time now is 06:25 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"