Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 132
Default Macro with formula

Hi

How do I have to code the below procedure in a macro properly?

ATLN40 = "=Sum(B2:B4)"

I want to diplay the result in other cell. I have the following code:
Range("A1").Value= ATLN40 & " - 20's"
What I am getting now in Range A1 is =Sum(B2:B4) - 20's , not the
result of the sum.

Could anyone help me please?

Thanks,
Orquidea
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Macro with formula

Sub ordinate()
Range("A1").Value = Application.WorksheetFunction.Sum(Range("B2:B4"))
End Sub

--
Gary''s Student - gsnu200760
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 132
Default Macro with formula

Thanks Gary.

I will still need the variable ATLN40 = (the total of the sum). I will need
the total for other calculations. I will refer to ATLN40.

"Gary''s Student" wrote:

Sub ordinate()
Range("A1").Value = Application.WorksheetFunction.Sum(Range("B2:B4"))
End Sub

--
Gary''s Student - gsnu200760

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Macro with formula

Check your other thread.

orquidea wrote:

Hi

How do I have to code the below procedure in a macro properly?

ATLN40 = "=Sum(B2:B4)"

I want to diplay the result in other cell. I have the following code:
Range("A1").Value= ATLN40 & " - 20's"
What I am getting now in Range A1 is =Sum(B2:B4) - 20's , not the
result of the sum.

Could anyone help me please?

Thanks,
Orquidea


--

Dave Peterson
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
help with the macro or with the formula Igneshwara reddy[_2_] Excel Worksheet Functions 6 March 22nd 07 09:16 PM
Macro Formula Corey Excel Discussion (Misc queries) 1 February 4th 06 06:13 PM
formula or macro Kucey Excel Worksheet Functions 1 November 2nd 05 01:47 AM
how to run a macro from a formula? davidhub Excel Discussion (Misc queries) 2 July 5th 05 02:42 PM
Help on Macro or Formula Nigel Excel Discussion (Misc queries) 2 June 13th 05 01:27 PM


All times are GMT +1. The time now is 05:24 AM.

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

About Us

"It's about Microsoft Excel"