IF Mutiple Same Values in Same Column Formula

rowbro

New Member
Joined
Dec 16, 2010
Messages
48
Hi folks - I am trying to figure out the most simple formula to do the following:

IF the value of two items in the same column have the same value (stock name) AS WELL AS the same date AND the same additional value (buy or sell), then, calculate a weighted average price using the following sum: sumproduct(A1*B1+A2*B2)/sum(B1+B2).

Thanks.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Chris Mack

Well-known Member
Joined
Jun 18, 2013
Messages
803
I would use an "IF(SUM(IF" array formula (or an "IF(SUMPRODUCT" formula) to calculate whether or not multiple matches exist, and then perform a weighted average calculation if that condition was present.

Chris.
 
Upvote 0

rowbro

New Member
Joined
Dec 16, 2010
Messages
48
Thanks Chris - the issue I have, however, is that I want the "IF" to look for repeated values, not to have to say "IF(A1="Blah",,)". The reason for this is that there are about 50 possible values that could be repeated. Any work around for this?

Thanks again.
 
Upvote 0

Chris Mack

Well-known Member
Joined
Jun 18, 2013
Messages
803
I'd really have to have a better idea of the way the sheet is structured and what you're looking for specifically.

What I'm suggesting is more of a "IF(SUM(IF($A$1:$A$100="Blah",,)".

Chris.
 
Upvote 0

Forum statistics

Threads
1,191,685
Messages
5,988,058
Members
440,125
Latest member
vincentchu2369

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top