0 votes

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))`

I receive an error message, something in the syntax has to be fixed. Can someone please help me with this?

Sep 24, 2022 in Others 3,202 views

1 answer to this question.

0 votes

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.

answered Sep 25, 2022 by
• 63,720 points

0 votes
1 answer

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

0 votes
1 answer

How Can I Round Prices to the nearest 0.95 with an Excel Formula?

Try this: =IF(OR(A3-FLOOR(A3,1)>0.95,A3=CEILING(A3,1)),CEILING ...READ MORE

0 votes
1 answer

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

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

0 votes
1 answer

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

0 votes
1 answer

Excel If field with rounding

Here's your formula. Assumes your cell containing ...READ MORE

0 votes
1 answer

Equivalent of Excel Round function

Here's a sample LINQPad program that demonstrates one way ...READ MORE

0 votes
1 answer

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

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

0 votes
1 answer

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

0 votes
1 answer

How to trick an Excel function that wants a column as input to accept a list of values as if these were in a column

Use VSTACK: vstack to make an array: Use it as value ...READ MORE

0 votes
1 answer

Excel AVERAGEIF function in combination with MOD to average over every nth row not behaving as expected

Average Every Nth Row All three finish in ...READ MORE