# IF Formula, returning a MROUND formula

#### dragons

##### New Member
Hi, think i have wasted enough time on this and am going to the experts.

I have a large spread sheet of manhole data.

say column B has the text "round" , "square" etc
and column C has the numbers 1010, 1040, 1180, 1090, 1210 etc...

I wanted to return (in another column, say D) one of two values for all the round manholes, being either 1050 or 1200.

using MROUND(C1,150) i can get 95% of the data to be either 1050 or 1200 (which is good enough for me, for now)

how do i incorporate the IF statement of IF(B1='round')

to put it another way: If B1 equals "round" then C1 is either 1050 or 1200 depending on which it is closer to.

Cheers

### Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
You did not specify what to do when B is not equal to "round". Below is C1 is returned unmodified in such a situation:

=IF(\$B1="round",MROUND(\$C1,150),\$C1)

You did not specify what to do when B is not equal to "round". Below is C1 is returned unmodified in such a situation:

=IF(\$B1="round",MROUND(\$C1,150),\$C1)

Thanks for that, worked a treat.

I'll have to look into the use of '\$' for future formulas and how to return a blank if false (not equal to round).

Thanks again

...
how to return a blank if false (not equal to round).
Put your cursor on the word IF in your formula and press F1.

Thanks for that, worked a treat.

I'll have to look into the use of '\$' for future formulas and how to return a blank if false (not equal to round).

Thanks again

The formula would become:

=IF(\$B1="round",MROUND(\$C1,150),"")

if you don't want return anything when B1 does not equal "round".

Replies
8
Views
1K
Replies
9
Views
394
Replies
0
Views
807
Replies
1
Views
328
Replies
4
Views
521

1,217,756
Messages
6,138,427
Members
450,136
Latest member
Tabako1960

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