Add column A when the Values in Column B are less than the Values in Column C.

Sir_BlahBlah

New Member
Joined
Apr 17, 2020
Messages
6
Office Version
  1. 365
Platform
  1. Windows
I am trying to figure out a way add the values in column A if the corresponding value in column B is less than the value in column C.
I thought I had this figured out with a simple =SUMIF(B1:B5, "<"&C1:C5, A1:A5)

However I noticed that the results were changing depending on which cell I put the formula in, and I'm not sure why. I show this in the picture, cells E1 through G8 all have the exact same formula.

I'm hoping this can be done simply without having to deal with arrays.

Thanks for your help!
 

Attachments

  • 1.JPG
    1.JPG
    30.3 KB · Views: 7

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
TRY
=SUM(IF(B2:B6<C2:C6,A2:A6))
use Control+Shift+Enter to set as an array formula

{=SUM(IF(B2:B6<C2:C6,A2:A6))}
 
Upvote 1
Solution
Thanks buddy, that works.

its just a pain dealing with so many array calculations in a workbooks the sizes i deal with.
 
Upvote 0
=SUMPRODUCT((B2:B6<C2:C6)*A2:A6)
Does this work as a non array formula
 
Upvote 0
That it does, as does
=SUMPRODUCT(--(B2:B6<C2:C6),A2:A6)

It would seem that I don't fully grasp the versatility of SUMPRODUCT as I was literally using =SUMPRODUCT(--(B2:B6<C2:C6)) earlier to count everything.
 
Upvote 0

Forum statistics

Threads
1,215,051
Messages
6,122,871
Members
449,097
Latest member
dbomb1414

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
Back
Top