IF function in combination with an Round function Excel

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 by Kithuzzz
• 28,900 points
133 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 narikkadan
• 53,520 points

Related Questions In Others

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

answered Oct 22, 2022 in Others by narikkadan
• 53,520 points
73 views
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

answered Nov 10, 2022 in Others by narikkadan
• 53,520 points
65 views
0 votes
1 answer

Creating an unique export data VBA Macro Function in Excel

Unfortunately, the tables will vary in size. ...READ MORE

answered Nov 14, 2022 in Others by narikkadan
• 53,520 points
91 views
0 votes
1 answer

How to increment row value in an index function in excel?

Try this- =INDEX($F$27:$F$40,COLUMN(A$1)) It will automatically increase the row ...READ MORE

answered Nov 17, 2022 in Others by narikkadan
• 53,520 points
209 views
0 votes
1 answer

Excel If field with rounding

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

answered Sep 27, 2022 in Others by narikkadan
• 53,520 points
131 views
0 votes
1 answer

Equivalent of Excel Round function

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

answered Sep 26, 2022 in Others by narikkadan
• 53,520 points
126 views
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

answered Sep 27, 2022 in Others by narikkadan
• 53,520 points
138 views
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

answered Nov 4, 2022 in Others by narikkadan
• 53,520 points
96 views
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

answered Sep 24, 2022 in Others by narikkadan
• 53,520 points
240 views
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

answered Oct 9, 2022 in Others by narikkadan
• 53,520 points
129 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP