#1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 6
Default Sum Product

Hi

I have a problem creating a formula, can someone help.

I have a Column A with duplicate codes, in Column B with values for
each code.
I need to Sum the values of similar codes and enter into Column C same
row where the first unique occurrence appear in Column A.

Example
Code, Count, Result
AC, 1, 3
AC, 2,
ACU, 1, 9
ACU, 2,
ACU, 4,
ACU, 2,
AFU, 1, 5
AFU, 4,
AFU, 4,

I would appreciate if someone helps me with this formula.

Thanks in advance

FLDS
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 5,441
Default Sum Product

flds,

In C2, enter

=IF(COUNTIF($A$1:A2,A2)=1,SUMPRODUCT(($A$2:$A$1000 =A2)*($B$2:$B$1000)),"")

then copy down to match column A. Increase the 1000 if you have more than 1000 rows of data.

HTH,
Bernie
MS Excel MVP


"flds" wrote in message
...
Hi

I have a problem creating a formula, can someone help.

I have a Column A with duplicate codes, in Column B with values for
each code.
I need to Sum the values of similar codes and enter into Column C same
row where the first unique occurrence appear in Column A.

Example
Code, Count, Result
AC, 1, 3
AC, 2,
ACU, 1, 9
ACU, 2,
ACU, 4,
ACU, 2,
AFU, 1, 5
AFU, 4,
AFU, 4,

I would appreciate if someone helps me with this formula.

Thanks in advance

FLDS



  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 15,768
Default Sum Product

Here's another one. Assuming your data starts on row 2.

=IF(A2<A1,SUMIF(A$2:A$10,A2,B$2:B$10),"")

BTW, your results should be 3,9,9

--
Biff
Microsoft Excel MVP


"flds" wrote in message
...
Hi

I have a problem creating a formula, can someone help.

I have a Column A with duplicate codes, in Column B with values for
each code.
I need to Sum the values of similar codes and enter into Column C same
row where the first unique occurrence appear in Column A.

Example
Code, Count, Result
AC, 1, 3
AC, 2,
ACU, 1, 9
ACU, 2,
ACU, 4,
ACU, 2,
AFU, 1, 5
AFU, 4,
AFU, 4,

I would appreciate if someone helps me with this formula.

Thanks in advance

FLDS



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
product key ahmed[_2_] Setting up and Configuration of Excel 1 September 6th 07 11:27 PM
Sum Product vs Sum(If) anandmr65 Excel Discussion (Misc queries) 3 June 21st 06 08:01 PM
Sum product HJ Excel Worksheet Functions 6 February 16th 06 06:05 PM
product from k= 0 to n sylphide Excel Worksheet Functions 3 February 3rd 06 11:41 AM
Sum Product help Stacy M via OfficeKB.com Excel Worksheet Functions 1 August 8th 05 05:45 PM


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