1

I want to run a formula that checks each cell between say F2 and F8, and if they match the relative cell in column B, it adds those cells together, and outputs in cell F9.

Example expected result:

|B2 - 5 |  |F2 - 10|
|B3 - 6 |  |F3 - 6 |- Match
|B4 - 9 |  |F4 - 9 |- Match
|B5 - 12|  |F5 - 15|
|B6 - 2 |  |F6 - 2 |- Match
|B7 - 14|  |F7 - 14|- Match
|B8 - 1 |  |F8 - 7 |
|B9 -   |  |F9 - 31|- Output Cell

Edit: I left the part out where I ask if this is even possible. Silly me. So yeah, is this sort of formula possible on Google Sheets, or am I better off trying something else?

1
  • Welcome. Please remember that as per site guidelines when an answer addresses your question, you should accept it so others can benefit as well. Jan 21 '20 at 18:02
0

The formula you would use is:

=ArrayFormula(SUM(IF($B2:$B27=K2:K27,$B2:$B27,"")))

Functions used:

3
  • I've applied this formula to the spreadsheet, but it's producing wildly incorrect results. screenshot The green highlighted numbers are the ones that match the cell in column B, red do not. The formula is applied to the bottom of each column EXCEPT for column B (which has its own =SUM). The expected outcome is that the bottom cell would be the sum of the green numbers, while ignoring red numbers
    – Alex
    Jan 21 '20 at 21:07
  • I had completely misread your question. The formula is now fixed. Jan 22 '20 at 22:33
  • Thankyou, that's exactly what I needed
    – Alex
    Jan 23 '20 at 3:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.