IF Formula, returning a MROUND formula

dragons

New Member
Joined
Sep 8, 2014
Messages
9
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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
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)
 
Upvote 0
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
 
Upvote 0
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".
 
Upvote 0

Forum statistics

Threads
1,214,838
Messages
6,121,885
Members
449,057
Latest member
Moo4247

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

Which adblocker are you using?

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
Back
Top