Mar 28 2023 09:27 PM
I am trying to write a custom function for rounding a set of data. So that I can reuse it for each form I create and not have to rewrite the whole function.
I have tried to use Macros and VBA but frankly I have no idea what to write in them, I tried an assortment of things but none worked.
The code i wish to simplify into its own function:
=IF(ISODD(ActiveCell.value),CEILING(ActiveCell.value,1),FLOOR(ActiveCell.value,1))
so for example F3 contains the value of 31.2
=IF(ISODD(F3),CEILING(F3,1),FLOOR(F3,1))
= 32
Can I make this it’s own function?
Mar 28 2023 11:36 PM
Mar 28 2023 11:48 PM
Mar 29 2023 10:19 AM
thank you for your help, I am still confused on forming the whole thing.
What can I use in the formula to set reference to the cell selected by the user.
for example, if I want to do simple addition:
=sum(F3+F4)
F3 and F4 were each clicked on the user after starting the formula.
or in your example “x”
For my formula,
I want the user to insert the formula name and select the desired cell they wish to use. What do I write to reference to the current selected cell by the user in:
IF(ISODD(Cell),CEILING(CELL,1),FLOOR(X,1))
Mar 29 2023 02:37 PM