Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
any UDF for sum or rounded product
Function mySP(rng1 As Range, rng2 As Range, Optional dec As Long = 2)
mySP = Application.Caller.Parent.Evaluate("SUMPRODUCT(ROU ND(A1:A3*B1:B3," & dec & "))") End Function =mySP(A1:A3,B1:B3,1) -- --- HTH Bob (change the xxxx to gmail if mailing direct) "dribler2" wrote in message ... I have two columns (e.g. a1:a100 and b1:b100) filled numeric values and i need the sumproduct of the two columns of data, considering that it will only read or sum the each result up to 2 decimal places only .... can anyone help me out with this with a single UDformula. e.g. [col A] [col B] [rounded product A*B in 2 decimals] [$ 1.233 ] [ 33.222 ] [ $ 40.96 ] [$ 0.245 ] [ 11.111 ] [ $ 2.72 ] [$ 0.122 ] [ -3.215 ] [ $ -0.39 ] from the above sample the sum of the product (2 decimals) = $43.29 i hope that the UDF, if available, can be instructed for any user desired number of decimals. can anyone help me out with this. any of your suggestion is requested. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
rounded # to correct # | Excel Worksheet Functions | |||
add rounded numbers using the rounded value | Excel Discussion (Misc queries) | |||
Product Code and Product Description setup | Excel Worksheet Functions | |||
I need a product key for my Trail product, 2007 Microsoft Office s | Setting up and Configuration of Excel | |||
Vlookup code product and to copy commentary with photo of the product in vba | Excel Programming |