# if a sum of cells is greater than a cell return the lower value

##### New Member
Hello there, looking for the following formula

Eg if the sum of cells A1: A10 is greater than the value in B12, then return the value in B12 else return the sum of A1:A10

### Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Excel Formula:
``=IF(SUM(\$A\$1:\$A\$10)>B12,B12,SUM(\$A\$1:\$A\$10))``

Thanks so much, really appreciate it. It worked!

You could also use this shorter formula...

=MIN(SUM(\$A\$1:\$A\$10),B12)

Replies
8
Views
170
Replies
3
Views
143
Replies
6
Views
289
Replies
3
Views
108
Replies
1
Views
134

1,206,808
Messages
6,074,990
Members
446,112
Latest member
nmz1133

### 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.

### Which adblocker are you using?

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

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