Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 553
Default SUMPRODUCT with an IF condition?

Data is:
AMT RATE
A-I
A-II
A-III
B-I
B-II
B-III
C-I
C-II
C-III

I want to find out sumproduct of I, II and III of A B C separately, with a
single formula as:
Sales-I
Sales-II
Sales-III

Thanx!

FARAZ

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,355
Default SUMPRODUCT with an IF condition?

Try something like this:

=SUMPRODUCT(--(RIGHT(A2:A10,LEN(A2:A10)-2)="I"),(B2:B10))



"FARAZ QURESHI" wrote:

Data is:
AMT RATE
A-I
A-II
A-III
B-I
B-II
B-III
C-I
C-II
C-III

I want to find out sumproduct of I, II and III of A B C separately, with a
single formula as:
Sales-I
Sales-II
Sales-III

Thanx!

FARAZ

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,355
Default SUMPRODUCT with an IF condition?

Forgot to mention that it's an array formula and you need to commit with CTRL
SHIFT ENTER

"FARAZ QURESHI" wrote:

Data is:
AMT RATE
A-I
A-II
A-III
B-I
B-II
B-III
C-I
C-II
C-III

I want to find out sumproduct of I, II and III of A B C separately, with a
single formula as:
Sales-I
Sales-II
Sales-III

Thanx!

FARAZ

  #4   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default SUMPRODUCT with an IF condition?

Assuming the source lookup range viz:
A-I
A-II

....

is in A2:A10, with corresponding amts in B2:B10

and you have the below in say, A12:A14
Sales-I
Sales-II
Sales-III


You could put this into B12 (normal ENTER):
=SUMPRODUCT(--(TRIM(MID($A$2:$A$10,SEARCH("-",$A$2:$A$10)+1,99))=TRIM(MID(A12,SEARCH("-",A12)+1,99))),B$2:B$10)
Copy down to B14 to return the required results
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"FARAZ QURESHI" wrote:
Data is:
AMT RATE
A-I
A-II
A-III
B-I
B-II
B-III
C-I
C-II
C-III

I want to find out sumproduct of I, II and III of A B C separately, with a
single formula as:



Thanx!

FARAZ

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 553
Default SUMPRODUCT with an IF condition?

Thanx a lot Barb,

But I think you overlooked the column C showing rate for "sumproduct", or
rather I was unable to explain myself clearly. However, the following formula
worked out great:

SUMPRODUCT(--(RIGHT(A2:A10,LEN(A2:A10)-2)="I"),(B2:B10)*(C2:C10))

Thanx again!

"Barb Reinhardt" wrote:

Try something like this:

=SUMPRODUCT(--(RIGHT(A2:A10,LEN(A2:A10)-2)="I"),(B2:B10))



"FARAZ QURESHI" wrote:

Data is:
AMT RATE
A-I
A-II
A-III
B-I
B-II
B-III
C-I
C-II
C-III

I want to find out sumproduct of I, II and III of A B C separately, with a
single formula as:
Sales-I
Sales-II
Sales-III

Thanx!

FARAZ

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
Multiple Lookup as condition in sumproduct formula ExcelMonkey Excel Worksheet Functions 2 April 4th 07 08:34 PM
sumproduct and colored cell as a condition to be met George P Excel Worksheet Functions 2 January 9th 07 05:18 PM
Sumproduct: condition with ? Sarah Excel Discussion (Misc queries) 3 November 1st 06 06:33 PM
Sumproduct with condition??? neda5 Excel Discussion (Misc queries) 5 December 14th 05 02:09 AM
If condition is true return sumproduct of two arrays Felipe Excel Worksheet Functions 0 October 14th 05 05:26 AM


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

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"