Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How do I subtotal specific / random rows from a spreadsheet?

I have a spreadsheet with 3 types of rows -- hardware, software, and support.
Column A in each row starts with HW-xxxx-yyyyy or SW-xxxx-yyyy or
SP-xxxx-yyyyy. Column G has the price for that row/part. The number of
rows will vary based upon project but will typically be less than 100. At
the bottom I want 3 subtotals -- one for hardware, one for software, and one
for support. The hw, sw and support parts per system component are clearly
grouped so if I sort on Column A and do subtotals I lose clarity of the
information being presented. I don't want to rearrange the rows in order to
calculate the subtotals and I don't want to have to manually add all of the
correct rows for each subtotal for every project. I want a subtotal that
does something like the following

For HW subtotal -- For x=1..75 (sum(if cell ax='hw-', then include value
from cell gx in sum, otherwise include zero in sum))

The 1..75 input parameters in the formula for that cell would be customized
by project, but otherwise the formula will work consistently for every
project without further modification.

Is there a way to do this with standard Excel formulas? Can this be done
with a macro? Any other ideas?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,069
Default How do I subtotal specific / random rows from a spreadsheet?

I'm not sure what 1..75 represents. If your data is in rows 1-75, this
formula should give you the hardware subtotal:

=SUMPRODUCT(--(LEFT($A$1:$A$75,3)="HW-"),$G$1:$G$75)

the same formula should also work for software and support subtotals, bu
substituting SW- or SP- for HW-.

Bob Phillips explains =sumproduct() in more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

Hope this helps,

Hutch

"Duke Bond" wrote:

I have a spreadsheet with 3 types of rows -- hardware, software, and support.
Column A in each row starts with HW-xxxx-yyyyy or SW-xxxx-yyyy or
SP-xxxx-yyyyy. Column G has the price for that row/part. The number of
rows will vary based upon project but will typically be less than 100. At
the bottom I want 3 subtotals -- one for hardware, one for software, and one
for support. The hw, sw and support parts per system component are clearly
grouped so if I sort on Column A and do subtotals I lose clarity of the
information being presented. I don't want to rearrange the rows in order to
calculate the subtotals and I don't want to have to manually add all of the
correct rows for each subtotal for every project. I want a subtotal that
does something like the following

For HW subtotal -- For x=1..75 (sum(if cell ax='hw-', then include value
from cell gx in sum, otherwise include zero in sum))

The 1..75 input parameters in the formula for that cell would be customized
by project, but otherwise the formula will work consistently for every
project without further modification.

Is there a way to do this with standard Excel formulas? Can this be done
with a macro? Any other ideas?

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
Subtotal with the protected spreadsheet Daniel Utsch Excel Discussion (Misc queries) 5 October 16th 09 03:39 PM
count specific subtotal values only katagrga Excel Discussion (Misc queries) 8 May 1st 09 01:29 PM
Adding random #s in a range to equal a specific # Jeff Excel Worksheet Functions 4 April 28th 08 02:46 PM
Subtotal-new spreadsheet at each break? DRayner Excel Worksheet Functions 1 February 8th 08 12:35 AM
Can I find a specific value in a random column of numbers yazmaz Excel Worksheet Functions 4 April 17th 07 03:55 PM


All times are GMT +1. The time now is 01:43 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"