Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
if the ActiveCell is at the top of the range
Set rng = Range(ActiveCell, ActiveCell.End(xldown)) tot = Application.Sum(rng) if the activeCell is at the bottom of the range (next blank cell set rng = Range(ActiveCell.Offset(-1,0),ActiveCell(-1,0).End(xlup)) tot = Application.Sum(rng) or ActiveCell.Formula = "=Sum(" & rng.Address & ")" -- Regards, Tom Ogilvy "raymondsum" wrote in message ... i want to sum up certain range but i dont get the range as it is different in every time when running program.how do i write a macro to sum up range. i have already used "alt+=", but it cant satisify because it return the designated range. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I enter formula sum(range+range)*0.15 sumif(range=3) | Excel Discussion (Misc queries) | |||
Cond. Format Data Bars of range based on values of another range | Excel Worksheet Functions | |||
Excel Addin:Setting the range to the Excel.Range object range prop | Excel Worksheet Functions | |||
Selecting range in list of range names depending on a cell informa | Excel Discussion (Misc queries) | |||
how to? set my range= my UDF argument (range vs. value in range) [advanced?] | Excel Programming |