To round a certain value, I'm attempting to combine an IF function with a round function. In this instance, cell H2 contains the value. E2 = decimal places There are 9 decimal places if E2=9. I try to utilize this formula (which is only dependent on E2=0 and E2=1), but it does not work.

`=IF( E2= 0,ROUND( \$H2, 2),IF( E2=1 ,ROUND( \$H2, 1))`

Sep 24, 2022 in Others 1,248 views

## 1 answer to this question.

I'm not sure if it is a language setting, but I had to change every ',' to a ';'. Additionally, you overlooked a closing break.

```=IF(E2=0;ROUND(\$H2;2);IF(E2=1;ROUND(\$H2;1)))
```

Besides this, I think that

```=IFERROR(ROUND(\$H\$2;E2); 0)
```

would be a better solution to use. Now you don't need the IF functions.

• 63,160 points

## How to print an Excel Sheet using VBA with Nitro PDF Creator in Excel 2016

you can use the built-in excel facilities ...READ MORE

## How do I protect all worksheet in an Excel workbook with a single click?

VBA Code : Dim ws as Worksheet Dim pwd ...READ MORE

## Help needed with Median If in Excel

Try entering the formula =MEDIAN(IF(\$A\$1:\$A\$6="Airline",\$B\$1:\$B\$6,"")) in another ...READ MORE

## IF formula to compare a date with current date and return result

You can enter the following formula in ...READ MORE

## Excel Formula - if values in columns all contain X then return

You can use the AND function: = IF(AND(A3="OK";B3="OK";C3="OK");"everything ...READ MORE