Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default Summing a range

Hi,

I need to use VBA code to define a range and then sum the values of the
cells in that range and place the answer in another cell. So far I have this
but it does not work!

I have defined ReportRange as the range to be summed and RangeValue as Long
to be used for the result

Set ReportRange = Sheets(2).Range(Cells(7, 24), Cells(EndDate, 24))

RangeValue = "=Sum(" & ReportRange.Address(True, False) & ")"


Sheets(16).Select


Sheets(16).Range("d12").Value = RangeValue


Where am I going wrong please?


Alan
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
Summing a range of cells based on criteria in another range Jack Excel Worksheet Functions 2 November 5th 09 01:46 AM
summing a range in a UDF Grymjack Excel Programming 0 June 28th 06 08:00 PM
Summing a Range With N/A's SamuelT Excel Discussion (Misc queries) 3 June 19th 06 04:51 PM
Summing between Range cb3291u Excel Discussion (Misc queries) 2 May 31st 06 04:46 PM
Summing a range. Please Help! [email protected] Excel Programming 5 March 4th 05 10:11 PM


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