Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-06-2018, 05:56 AM
LearnerExcel LearnerExcel is offline Auto Sum calculate the values of rows that are hidden ... Windows 7 32bit Auto Sum calculate the values of rows that are hidden ... Office 2003
Advanced Beginner
Auto Sum calculate the values of rows that are hidden ...
 
Join Date: Nov 2016
Posts: 81
LearnerExcel will become famous soon enoughLearnerExcel will become famous soon enough
Default Auto Sum calculate the values of rows that are hidden ...

I have the first row with auto sum function to calculate the (Total Invoice Value) which is in column "H".



There are hundreds of invoices with details. So, when I want to filter any one invoice, say, Invoice No. 1550 (Which has 10 rows with 10 item details), the Total Invoice Value is showing the sum of whole column not of just these 10 rows.

How to resolve this issue?
Reply With Quote
  #2  
Old 02-06-2018, 06:26 AM
Alsadius Alsadius is offline Auto Sum calculate the values of rows that are hidden ... Windows 7 64bit Auto Sum calculate the values of rows that are hidden ... Office 2010 32bit
Novice
 
Join Date: Nov 2017
Posts: 25
Alsadius is on a distinguished road
Default

What I usually do here is make a dummy column that's set to 1 if you want to count that row and 0 if you don't. Then just SUMPRODUCT the price with that dummy column.

For example, let's say column A is invoice number, B is item ordered, and C is price. You also have cell D1 with the invoice number you're filtering for. You'd add column E, and in E1 you'd type =IF(A1=$D$1, 1, 0), and copy that all the way down column E. Then the sum of that particular invoice is =SUMPRODUCT($A$1:$A$9999, $E$1:$E$9999). You're multiplying all prices on different invoices by zero(ignoring them) and on the desired invoice by 1(keeping them), and adding up the total.
Reply With Quote
  #3  
Old 02-06-2018, 06:43 AM
NBVC's Avatar
NBVC NBVC is offline Auto Sum calculate the values of rows that are hidden ... Windows 10 Auto Sum calculate the values of rows that are hidden ... Office 2013
The Formula Guy
 
Join Date: Mar 2012
Location: Mississauga, CANADA
Posts: 215
NBVC will become famous soon enoughNBVC will become famous soon enough
Default

use the SUBTOTAL() function. It sums the filtered values.
Reply With Quote
  #4  
Old 02-06-2018, 06:53 AM
LearnerExcel LearnerExcel is offline Auto Sum calculate the values of rows that are hidden ... Windows 7 32bit Auto Sum calculate the values of rows that are hidden ... Office 2003
Advanced Beginner
Auto Sum calculate the values of rows that are hidden ...
 
Join Date: Nov 2016
Posts: 81
LearnerExcel will become famous soon enoughLearnerExcel will become famous soon enough
Default

Thanks for the support.

Code:
 
=Subtotal(function number, data range)
The function number to sum filtered data is 9.
The formula would be defined as follows:
Code:
=Subtotal(9,A1:A10)
Reply With Quote
  #5  
Old 02-06-2018, 09:21 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Auto Sum calculate the values of rows that are hidden ... Windows 7 64bit Auto Sum calculate the values of rows that are hidden ... Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,779
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

And starting with 2010 the AGGREGATE function
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto Sum calculate the values of rows that are hidden ... Auto populate & auto calculate values from other sections in the same word document Frantic Word VBA 2 01-24-2015 04:54 PM
Auto Sum calculate the values of rows that are hidden ... VBA to keep hidden rows hidden when filtering tectonicseer Excel Programming 1 07-27-2014 11:54 AM
add values to dropdown selections and calculate guyhs Word 7 10-24-2012 05:11 PM
Auto Sum calculate the values of rows that are hidden ... hidden rows gsrikanth Excel 5 01-19-2012 02:40 PM
calculate average depending on drop-down values virencm Word 0 08-06-2010 06:10 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:18 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft