Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a function that can increase the price of an item
based on it's weight and current cost of material. I now need to add a "RoundUp" portion to the function. Can I use a function "inside" another one????? TIA |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() -----Original Message----- I have a function that can increase the price of an item based on it's weight and current cost of material. I now need to add a "RoundUp" portion to the function. Can I use a function "inside" another one????? TIA . Yes, you certainly can.. I have done it many times.. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Are we talking Excel or VBA. If Excel, that is not a problem, For instance
=IF(A10, ROUNDUP(A1,0), B1) Similarly, in VBA, it could be Function abc(rng As Range) If rng(1, 1).Value 0 Then abc = WorksheetFunction.RoundUp(rng, 0) Else abc = rng.Offset(0, 1).Value End If End Function -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "KMcNelson" wrote in message ... I have a function that can increase the price of an item based on it's weight and current cost of material. I now need to add a "RoundUp" portion to the function. Can I use a function "inside" another one????? TIA |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello
You can use the worksheet roundup function in a UDF. See below. Function SPrice(Weight As Double, MatCost As Double) As Double SPrice = Application.WorksheetFunction.RoundUp(Weight * MatCost, 0) End Function Regards Peter -----Original Message----- I have a function that can increase the price of an item based on it's weight and current cost of material. I now need to add a "RoundUp" portion to the function. Can I use a function "inside" another one????? TIA . |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Peter! It worked great and now I can move on!!!!
-----Original Message----- Hello You can use the worksheet roundup function in a UDF. See below. Function SPrice(Weight As Double, MatCost As Double) As Double SPrice = Application.WorksheetFunction.RoundUp(Weight * MatCost, 0) End Function Regards Peter -----Original Message----- I have a function that can increase the price of an item based on it's weight and current cost of material. I now need to add a "RoundUp" portion to the function. Can I use a function "inside" another one????? TIA . . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
User defined functions without using VBA. | New Users to Excel | |||
User defined functions without using VBA. | Excel Discussion (Misc queries) | |||
User Defined Functions | Excel Worksheet Functions | |||
User Defined Functions | Excel Worksheet Functions | |||
User Defined Functions | Excel Worksheet Functions |