# How set an number-limitation in a cell.

#### davidkillen

##### New Member
Hello,

I making and hour and payment specification, im now stuck and need an formula.

I need a calculation that are limited, I mean that no matter what the calculation say IF it goes over an certain amount it should say that curtain amount, and you should be able to take that amount from an cell.

Is there an formula for this?

### Excel Facts

Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

#### njimack

##### Well-known Member
You haven't given a very good explanation of what you're trying to do, but it sounds like you need the MIN function.

#### Jack in the UK

##### Well-known Member
why not look at conditional formatting and say if cell x if greater than \$500 its turn yellow

design and develop as you like for one or more cells, no excel formulas required, just the conditional formatting formula

say cell A1 is hours rate - £12
cell a2 is hours worked - 45
cell a3 is total pay ie =A1*A2 = £540

if A3 > £500 goes yellowwith this function

=A3>500

Microsoft Excel 2013
Select the range you want to format conditionally, for example a1:a3. make sure the active cell within the selection is a3.

Home tab of the ribbon version 2013
Click Conditional Formatting goto Manage Rules...
Click New Rule
Select 'Use a formula to determine which cells to format'.
Enter the formula =A3>500
Click Format
Activate the Fill tab
Select yellow.
Click OK twice

jiuk

#### Jack in the UK

##### Well-known Member
Thsi function can also be used re the above if you just want a straight forumla

=IF(SUM(A1*A2)>=500,500)

#### Jack in the UK

##### Well-known Member
opps copied the wrong function, try this one

=IF(SUM(A1*A2)>=500,500,SUM(A1*A2))

#### davidkillen

##### New Member
Hi Jiuk..

This formula keep down my numbers if they get to high.

=IF(SUM(E23-E30)>=E22;E22)

But it seems like this formula only works when the sum of calculation between E23 and E30 goes over the amount that are in E22, if the sum is lower than E22 it just gives the error "FALSE".

I need to get the correct sum even if it goes under the amount in E22.

Replies
3
Views
136
Replies
6
Views
175
Replies
16
Views
236
Replies
0
Views
101
Replies
32
Views
437

1,195,618
Messages
6,010,731
Members
441,567
Latest member
Flitbee

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