• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Multiply values in row that match corresponding column

wamaral

New Member
Hi there, sorry if this is a confusing explanation but I am going to try my best. For this workbook, I am looking to first see if Yes is included in row 2, if so, I want the value in row 4 to be multiplied by the number in row 6. After each number is multiplied, I want them summed together and placed in D6. For example - going through column L:


D6= (F4*F6 + (G4+G6) + (H4+H6) + (I4+I6) + (L4+L6)

8130195= 0 + 1315783 + 1285333 + 5529080 + 0


The reason I am putting this in the VBA section because I don't think a regular formula can perform this action, unless there is something I am missing.


Link for workbook below


http://www.mediafire.com/view/?tj1yt6s25yj8ue4


Thank you all for the help
 
You want to sum the product? I have a function for that!

=SUMPRODUCT((F2:L2="YES")*(F4:L4),F6:L6)
 
Wow that is exactly what I was looking for thank you so much for the help! I can't believe I couldn't put that together myself...
 
Glad to help. SUMPRODUCT is one of my favorite functions because it's so versatile.
 
Don't worry Montrey, you'll beat me (again) sometime. I saw that you got me on this one:

http://chandoo.org/forums/topic/vlookup-and-sumproduct

Cheers mate!
 
Back
Top