IF statement with rounding in Excel Professional Plus 2019

%3CLINGO-SUB%20id%3D%22lingo-sub-2560576%22%20slang%3D%22en-US%22%3EIF%20statement%20with%20rounding%20in%20Excel%20Professional%20Plus%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2560576%22%20slang%3D%22en-US%22%3E%3CP%3EI%20need%20to%20work%20out%20how%20many%20appointments%20can%20be%20fitted%20into%20an%20hour%2C%20at%20different%20appointment%20intervals%20but%20I%20need%20them%20rounded%20down%20to%20the%20nearest%20whole%20number.%20I%20have%20looked%20at%20some%20other%20posts%20but%20the%20one%20I%20found%20doesn't%20make%20sense%20to%20me%3B%26nbsp%3B%20%26nbsp%3B%22%3CSPAN%3EReplace%20the%20A1%20with%20your%20IF%20statement%20minus%20the%20%3D%20in%20your%20formula.%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%3DROUND(A1%2F5%2C0)*5%22%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EMy%20equations%20need%20to%20be%20for%208%2C%2012%2C%2015%2C%2020%20minutes%20so%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E60%20minutes%20divide%20by%208%20minutes%20multiplied%26nbsp%3Bby%206.5%20hours%20%3D%2048.75.%20But%20I%20need%20it%20to%20show%2048.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3D(60%2F8)*6.5%3C%2FSPAN%3E%3C%2FP%3E%3CP%3ESo%20I%20need%20it%20to%20be%20the%20simple%20equation%2C%20then%20and%20IF%20statement%2C%20plus%20the%20rounding....%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2560576%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2560848%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20statement%20with%20rounding%20in%20Excel%20Professional%20Plus%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2560848%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1106648%22%20target%3D%22_blank%22%3E%40laurenwhelan%3C%2FA%3E%26nbsp%3BI%20would%20suggest%20you%20choose%20one%20of%20three%20functions%20to%20round%20down%20the%20calculated%20numbers.%20INT%2C%20TRUNC%20and%20ROUNDDOWN.%3C%2FP%3E%3CP%3EDemonstrated%20in%20the%20picture%20below.%20File%20attached%20for%20your%20convenience.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202021-07-19%20at%2006.20.56.png%22%20style%3D%22width%3A%20344px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F296679i15B9AC6C488EE458%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202021-07-19%20at%2006.20.56.png%22%20alt%3D%22Screenshot%202021-07-19%20at%2006.20.56.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

I need to work out how many appointments can be fitted into an hour, at different appointment intervals but I need them rounded down to the nearest whole number. I have looked at some other posts but the one I found doesn't make sense to me;   "Replace the A1 with your IF statement minus the = in your formula.  =ROUND(A1/5,0)*5"

 

My equations need to be for 8, 12, 15, 20 minutes so:

60 minutes divide by 8 minutes multiplied by 6.5 hours = 48.75. But I need it to show 48.

=(60/8)*6.5

So I need it to be the simple equation, then and IF statement, plus the rounding....

4 Replies

@laurenwhelan I would suggest you choose one of three functions to round down the calculated numbers. INT, TRUNC or ROUNDDOWN.

Demonstrated in the picture below. File attached for your convenience.

Screenshot 2021-07-19 at 06.20.56.png

 

 

@Riny_van_Eekelen 

Wow, thank you!

That looks great.... can you explain it to me?

@laurenwhelan Well, you already did most of the work by writing the formula as you described, 60 / n * 6.5 where n represents the duration (8, 12, 15 or 20 minutes).

 

All I did was the put the values 60 and 6.5 each in its own cell so that you can reference them in a formula, rather than "hard-coding" them. Should you ever want to change the hours per day to 7.5, just change it at the top and all calculations will be updated automatically. Note some $-signs. These make sure that a reference to a cell doesn't automatically change when you drag a formula to copy it across or down. Another way to achieve that would be to use Named Ranges. Google for that term in combination with Excel to learn more about it.

 

When it comes to rounding, the way you described it gives you a few options. Ignoring the decimals is easily achieved by the INTeger and TRUNCate functions. And then you could also use ROUNDDOWN. As the name suggest, it rounds down to the specified number of decimals. ROUNDDOWN(48.75,0) will result in 48. Or, ROUNDDOWN(48.75,1) will become 48.7. Compare this to the regular ROUND function, where ROUND(48.75,0) will produce 49. It rounds up or down to the nearest integer.

This is a wonderful explanation - thank you very much! I have learned a lot!