LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Sum Dynamic Range - VBA

Can anyone tell me why the end result of this function gives me the
#NAME? error in cell F2?

Function RangeTot()

Dim myLastCell As String
Dim myFirstCell As String

Selection.End(xlDown).Select

myFirstCell = ActiveCell.Address

Selection.End(xlDown).Select

myLastCell = ActiveCell.Address

Range("F2").Select
ActiveCell.FormulaR1C1 = "=sum(myFirstCell" & ":myLastCell" & ")"

End Function

TIA,

Chris

 
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
Dynamic Range Dave Excel Worksheet Functions 1 April 8th 08 04:21 AM
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM
copying dynamic range based on cell outside of range xcelelder Excel Programming 3 September 29th 05 05:08 PM
select dynamic range with dynamic start point Juli Excel Programming 1 August 31st 05 12:05 AM
Excel 2000 VBA - Set Print Range in dynamic range sub_pop[_5_] Excel Programming 2 July 27th 04 08:01 PM


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

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"