Create a roundup for a figure when I am using a IF function for something else.

bluedusty

New Member
Joined
Jan 24, 2021
Messages
7
Office Version
  1. 365
  2. 2013
  3. 2010
Platform
  1. Windows
Hello,

I am wondering how I go about using the round formula when I am already using and IF function in a cell for another reason.

Currently I have this formula in place:
=IF($J$3="",SUM(D5:D28),IF($J$3="23 Hour Day",SUM(D5:D27),IF($J$3="24 Hour Day",SUM(D5:D28),IF($J$3="25 Hour Day",SUM(D5:D29))))) - I need to provide hourly information so have it set to add or remove a box depending on time stamp selected. D5:D28/9 will normally be a long figure for example 0.299583333333

What I need to do is return the value in cells D5:D28/29 (Depending on IF function) to 3 decimal places. Cells D5:D28 display 2 decimal place but could make that 3 if it helps.

When I try to add the round function in it just seems to return a true, false or spill comment not an acutal figure.

Hopefully I have made what I am after clear enough, All help much appreciated.

Thanks
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
How about
Excel Formula:
=ROUND(IF($J$3="",SUM(D5:D28),IF($J$3="23 Hour Day",SUM(D5:D27),IF($J$3="24 Hour Day",SUM(D5:D28),IF($J$3="25 Hour Day",SUM(D5:D29))))),3)
 
Upvote 0
Solution
Hi Fluff,

This seems to accept the formula but if I put figures into cells D5:D29 it does not change from 0.00

1612389049471.png


the 0.14 is actually .1354166666667 but the sum of rates where this formula is doen not change.

Thanks for your help so far, very much appreciated
 
Upvote 0
Are you sure that D5:D29 are numbers & not text?
Also what is in J3?
 
Upvote 0
D5:D29 are numbers as per the box above showing the reading of 0.14

J3 is a list that you either pick 23hr day, 24 hr day or 25hr day.

If j3 is selected to 24hr day it will only look at figures in D5:28 and if j3 is on 23hr day it only looks at D5:D27 etc.

Thanks
 
Upvote 0
Sorry Fluff, Thank you very much, that formula did work - Operator error doh
 
Upvote 0
Glad you sorted it & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,376
Messages
6,119,179
Members
448,871
Latest member
hengshankouniuniu

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