LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default Adding values across a row based on a corresponding column val

Hi,

Yes there are many ways including

=SUMPRODUCT((A1:A4=A8)*(B1:B4+C1:C4+D1:D4))
=LOOKUP(A8,A1:A4,B1:B4+C1:C4+D1:D4)
=SUMPRODUCT(VLOOKUP(A8,A1:D4,{2,3,4}))
=SUM(OFFSET($A$1,MATCH(A8,A1:A4,0)-1,1,,3))
(provided there is only one occurance of Scott)

and this shortest I have seen

=SUM(IF(A1:A4=A8,B1:D4,0))

This last requires array entry.

By the way the oldest version I currently have installed is 2000, but to the
best of my recollection SUMPRODUCT was around in version 5 (about 1994) at
least.


If these help, please click the Yes button

Cheers,
Shane Devenshire


"Craig Deutsch" wrote:

Thanks to all who replied so promptly!

It looks like there are several ways to solve this problem, one of which is
to use SUMPRODUCT, and the other to use SUM and INDEX functions. For now I
went with SUMPRODUCT, which works effectively when the values in column A are
unique. So in my example, it's necessary to ensure that the names are unique.

This new SUMPRODUCT is evidently quite powerful. I didn't know it even
existed. Must be new to Office 2007.

"Craig Deutsch" wrote:

This is probably simple, but I cannot figure it out. Question refers to
table below:

Column A Column B Column C Column D
=============================
Julie 600 200 300
Scott 100 200 400
Tom 132132 111 4000
Craig 100 1000 100

Question: I'm trying to help a colleague calculate the value across a row
for Columns B-D when a value in Column A matches the criteria. For example,
I want Excel to calculate the totals for Scott. The result should be 700.

The formula I'm using is this: =SUMIF(A2:A5,"Scott",B2:D5). I know there's
something wrong with my Sum_range, but I cannot figure it out. Any help is
appreciated. Thank you.

 
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
Adding multiple values in one column based on multiple values of the same value (text) in another column [email protected] Excel Discussion (Misc queries) 1 May 16th 07 06:02 PM
Adding numerical values based on multiple values in another column Kazmaniac Excel Worksheet Functions 6 April 4th 07 08:53 PM
Adding values from 1 col based on value in diff col Big UT Fan Excel Discussion (Misc queries) 2 October 16th 06 08:44 PM
adding values based on criteria Brad Excel Worksheet Functions 1 July 20th 05 06:16 PM
Adding Values Based on a Separate Column binder Excel Discussion (Misc queries) 2 February 14th 05 07:17 PM


All times are GMT +1. The time now is 01:14 PM.

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

About Us

"It's about Microsoft Excel"