LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 519
Default Modify to ignore the first row.

Hello DataCollector from Steved

Thankyou.

"DataCollector" wrote:


This will work if you don't have any cells that don't have data in the
D,E,F,G columns. End(xlDown) finds the last cell with data in it.

Sub AddSum1()
r = Range("$D$1000").End(xlUp)
Range(Range("D2"), Range("D2").End(xlDown)).Name = "Begin"
Range(Range("G2"), Range("G2").End(xlDown)).Name = "End"

MsgBox "SUM:" _
& Application.WorksheetFunction.Sum(Range("Begin:End "))
End Sub


--
DataCollector
------------------------------------------------------------------------
DataCollector's Profile: http://www.hightechtalks.com/m368
View this thread: http://www.hightechtalks.com/t2295206




 
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
Modify a UDF please? Excel Helps Excel Worksheet Functions 2 January 23rd 08 09:40 AM
Modify a UDF please? Excel Helps Excel Worksheet Functions 0 January 23rd 08 12:10 AM
Modify a cell Vern Excel Discussion (Misc queries) 0 January 19th 07 08:51 PM
Modify this a bit Jay Excel Programming 5 April 22nd 05 06:43 PM
How would I modify the following? BruceJ[_2_] Excel Programming 3 October 29th 03 09:31 PM


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