Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2000 to Excell 97 Vba Problem
I was wondering if anyone had any ideas on how to Sum only visible cell
in a particular range. I then take this info and put it into a text bo in a userform. I'm currently using the function suggested on the microsoft website but that only seems to work for Excel 2000, and not Excel 97. Either a function or sub would be great, but they must work in Exce 97. This thing is killing me here. Thanks in Advance Jame -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2000 to Excell 97 Vba Problem
James,
use application.worksheetfunction.subtotal(9, range). Subtotal has many subfucntions (as the 9 parameter) suggests, but all the functions only operate on visible rows. --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2000 to Excell 97 Vba Problem
That is true only if the rows are visible or hidden as a result of a filter.
If that is the case, the Worksheetfunction.Subtotal(9,Range) would get the sum of the visible cells. If they have been hidden using code or manually, then subtotal would not work. in either case Dim rng as Range, rng1 as Range set rng = Range("B9:B35") set rng1 = rng.Specialcells(xlVisible) msgbox worksheetFunction.Sum(rng1) would sum just the visible cells. -- Regards, Tom Ogilvy Kieran wrote in message ... James, use application.worksheetfunction.subtotal(9, range). Subtotal has many subfucntions (as the 9 parameter) suggests, but all the functions only operate on visible rows. --- Message posted from http://www.ExcelForum.com/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2000 to Excell 97 Vba Problem
you guys are too good.
thanks so much for the help. You may have just saved me a monitor an a trip to the emergency room. Thanks again -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
PROBLEM:How to squeeze 2 Page sized Chart in Excel 2000 & embed in Word 2000 and print from Word to fit one page ??? | Excel Discussion (Misc queries) | |||
PROBLEM:How to squeeze 2 Page sized Chart in Excel 2000 & embed in Word 2000 and print from Word to fit one page ??? | New Users to Excel | |||
excel 2000 problem | Excel Worksheet Functions | |||
How to open MS Excell 2007 Sheet in MS Excell 2000??? | New Users to Excel | |||
excell 2000 to access 2000 | Excel Programming |