# Formula Combining IF, ROUND, AND

#### Rmayfield

##### New Member
Trying to figure out how to do an IF statement, a ROUNDUP and an AND statement in the same cell. Example

Cell A1 the number 75 in it
Cell A2 has an X in it
Cell A3 has my formula

I want the formula to say if cell A2 has an X in it, and cell A1 is <75, divide the number in A1 by 30 and round up. If cell A2 doesn't have an X, then leave the cell blank.

### Excel Facts

Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

#### JamesCanale

##### Well-known Member
MrExcelPlayground.xlsm
A
175
2X
3
Sheet20
Cell Formulas
RangeFormula
A3A3=IF(AND(A1<75,A2="X"),ROUNDUP(A1/30,0),"")

#### Fluff

##### MrExcel MVP, Moderator
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Cross posted at: Help with a FormulaCombining IF, ROUND, AND
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.

#### Rmayfield

##### New Member
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Cross posted at: Help with a FormulaCombining IF, ROUND, AND
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
Sorry, I did not remove my question from another site. I did now.

#### Fluff

##### MrExcel MVP, Moderator

There is no need to remove your question from the other site, just let us know in future.

Did the formula from JamesCanale work for you?

#### Rmayfield

##### New Member
There is no need to remove your question from the other site, just let us know in future.

Did the formula from JamesCanale work for you?
I don't know yet. Still working on it. I will let you know. Thanks.

#### Rmayfield

##### New Member
MrExcelPlayground.xlsm
A
175
2X
3
Sheet20
Cell Formulas
RangeFormula
A3A3=IF(AND(A1<75,A2="X"),ROUNDUP(A1/30,0),"")
That worked. Thank you so much!

Replies
6
Views
1K
Replies
1
Views
93
Replies
9
Views
136
Replies
1
Views
71
Replies
1
Views
61

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,163,437
Messages
5,831,625
Members
430,077
Latest member
CoulterM

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