Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
PROBLEM:How to squeeze 2 Page sized Chart in Excel 2000 & embed in Word 2000 and print from Word to fit one page ??? [email protected] Excel Discussion (Misc queries) 2 September 10th 08 11:07 AM
PROBLEM:How to squeeze 2 Page sized Chart in Excel 2000 & embed in Word 2000 and print from Word to fit one page ??? [email protected] New Users to Excel 2 September 10th 08 11:07 AM
excel 2000 problem Regina Excel Worksheet Functions 1 October 6th 07 03:36 PM
How to open MS Excell 2007 Sheet in MS Excell 2000??? Alek Luchnikov New Users to Excel 1 March 22nd 07 04:40 PM
excell 2000 to access 2000 vinimall[_2_] Excel Programming 2 October 22nd 03 03:56 PM


All times are GMT +1. The time now is 08:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"