# A formula to get a minimum quantity in a formula

#### alisag

##### New Member
So I'm trying to create a formula that lets me round up my lowest value to 6. I tried an IF statement (IF(Numerical Value)<=6, "6") which works but there are two problems. 1) the "6" is not recognized as a number so I can't do a total 2) for my numbers, that are great than 6 I get an error message. I essentially want my formula to round any number less than 6 to 6 while maintaining anything greater than or equal to 6. Hope this makes sense.

### Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
=max(a1,6)

Welcome to Mr Excel

Try something like this MAX(Numerical_value,6)

So, assuming A2 houses the numerical value
=MAX(A2,6)

Hope this helps

M.

ok that was ridiculously easy! thank you!! One more question, and I should have specified- Less than 6 but greater than 0. Anything that is 0 I want to it to stay as is.

=if(a1=0,0,max(a1,6))

Fabulous! Thanks so much Neil!

Replies
10
Views
152
Replies
21
Views
315
Replies
1
Views
141
Replies
2
Views
408
Replies
3
Views
198

Threads
1,203,203
Messages
6,054,110
Members
444,702
Latest member
patrickmg17

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

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