# Greater than or equal to

#### Sroule

##### New Member
Two columns

column 1: Depth
Column 2: Box Width

I need a formula for the box width column that says.....if the number in the depth column is greater than 4 but less than 6 it equals 4....If the number is greater than 6 but less than 20 it equals 8

### Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

#### Fluff

##### MrExcel MVP, Moderator
What should happen if the depth is less than 4 or greater than 20?

#### Sroule

##### New Member
Two columns

column 1: Depth
Column 2: Box Width

I need a formula for the box width column that says.....if the number in the depth column is greater than 4 but less than 6 it equals 4....If the number is greater than 6 but less than 20 it equals

What should happen if the depth is less than 4 or greater than 20?
less than 4 it would equal 0
greater than 20 it would still equal 8

#### Fluff

##### MrExcel MVP, Moderator
Excel Formula:
``=IF(A2<4,0,IF(A2<6,4,8))``

#### Sroule

##### New Member
Excel Formula:
``=IF(A2<4,0,IF(A2<6,4,8))``
with the same scenario could you create another formula that has it where if it is less than 4 than it would equal that number EX; 3.7 would equal 3.7, but 4.1 = 4 still!

#### Fluff

##### MrExcel MVP, Moderator
Just replace the 0 with A2

Replies
15
Views
195
Replies
9
Views
1K
Replies
2
Views
72
Replies
0
Views
41
Replies
1
Views
73

1,147,450
Messages
5,741,189
Members
423,647
Latest member
lyanndominique

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