Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Filters/Range/Summing

I have a spreadsheet that is about a1:h1500 big and I use filters to show
only the data that I want to see.
My question is how do I use this code below that works fine and get it to
only sum the shown cells. For example rows shown could be various such as row
2,8,37,54,104 etc. So when I use the code below to highlite and sum the
ranges it still adds the hidden rows such as 3,4,5,6,7,9,10....etc

I have:

Private Sub CommandButton1_Click()
Dim AreaClick As Range
Dim AreaSum As Long
Windows("how spent 73104rev.xls").Activate
Sheets("ITA ").Select
Set AreaClick = Application.InputBox(prompt:="Please click on area to sum",
Title:="Auto Sum", Type:=8)
AreaSum = WorksheetFunction.Sum(AreaClick)
MsgBox (AreaSum)

End Sub
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
Excel 2003 - Delete lists and/or filters from of range cells. Champ Excel Discussion (Misc queries) 2 December 18th 09 12:43 PM
Summing a range of cells based on criteria in another range Jack Excel Worksheet Functions 2 November 5th 09 01:46 AM
filters and summing in status bar Ann Excel Discussion (Misc queries) 1 August 30th 07 06:11 PM
Function that filters a list (Database) for criteria in a range a. FirstVette52 Excel Worksheet Functions 0 February 8th 05 04:37 PM
Summing a Range Bill Li Excel Programming 1 August 19th 03 05:40 AM


All times are GMT +1. The time now is 07:20 AM.

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"