Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,104
Default Entering Sum formula into a cell

Hi Parker,
Not exactly what you want but it works:

Sub tryme()
Dim myarea As Range
arow = 5
brow = 7
acell = "N" & arow
bcell = "N" & brow

Set myarea = Range(acell, bcell)
For Each mycell In myarea
s = s + mycell
Next
MsgBox s
End Sub

Bernard
"Parker" < wrote in message ...
I am having trouble entering a sum formula from a macro
into a cell. I have defined variables called 'StartRow'
and 'EndRow' and I want to enter a sum formula for column
N from 'StartRow' to 'EndRow' into the active cell. I
don't know how to incopropate the variables into the sum
formula.

Any help would be greatly appreciated.

Thanks in advance!

Parker



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
Entering Formula - Cannot select cell as it is hidden by formula Jim Excel Worksheet Functions 0 March 25th 10 07:22 AM
Warning when in another cell after entering a formula. Ephraim Excel Worksheet Functions 2 March 21st 10 01:20 AM
entering a formula into a cell with text TV Excel Discussion (Misc queries) 3 November 5th 08 04:45 PM
Entering Sum formula into a cell Leo Heuser[_2_] Excel Programming 0 September 29th 03 07:55 PM
Entering Sum formula into a cell Don Guillett[_4_] Excel Programming 0 September 29th 03 03:55 PM


All times are GMT +1. The time now is 09:54 AM.

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"