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 SUMPRODUCT function for two arrays. Array 1 contains text

i have one array A2 to A10 containing text (A+/A/B/C). another array C2 to
C10 contains numbers (0/1). i want to multiply each element of one array with
another, replacing A+ for 2, A for 1.5, B for 1 and C for .5. Example:
A B C
----------------------
A 0
A+ 1
B 0
C 1
...........................
it should give me the result: 2.5 [(replace A by 1.5*0) + (replace A+ by
2*1) + (replace B by 1*0) + (replace C by .5*1)]

Please help me with this..

Regards

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default SUMPRODUCT function for two arrays. Array 1 contains text

Either of these two array-entered** formulas seem to do what you want...

=SUM(B2:B10*IF(A2:A10="",0,2.5-MATCH(A2:A10,{"A+","A","B","C"},0)/2))

=SUM(B2:B10*IF(A2:A10="",0,LOOKUP(A2:A10,{"A","A+" ,"B","C"},{1.5,2,1,0.5})))

** Commit the formula by using Ctrl+Shift+Enter, not just Enter by itself.

Rick


"Payal" wrote in message
...
i have one array A2 to A10 containing text (A+/A/B/C). another array C2 to
C10 contains numbers (0/1). i want to multiply each element of one array
with
another, replacing A+ for 2, A for 1.5, B for 1 and C for .5. Example:
A B C
----------------------
A 0
A+ 1
B 0
C 1
..........................
it should give me the result: 2.5 [(replace A by 1.5*0) + (replace A+ by
2*1) + (replace B by 1*0) + (replace C by .5*1)]

Please help me with this..

Regards


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
Using SUMPRODUCT with arrays Scott@CW Excel Discussion (Misc queries) 3 April 25th 07 02:21 PM
SUMPRODUCT with 3 arrays not working Kierano Excel Worksheet Functions 1 October 16th 06 03:37 PM
Sumproduct arrays L. Howard Kittle Excel Discussion (Misc queries) 4 April 11th 06 01:11 PM
Sumproduct + Array Function? Darren Hill Excel Worksheet Functions 4 September 8th 05 01:47 PM
Two arrays need highlight duplicate in one of the array Luke Excel Worksheet Functions 4 July 25th 05 08:41 PM


All times are GMT +1. The time now is 11:35 AM.

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"