Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
if you dont want to use the function then
dim x as double dim abs as double if x < 0 then abs = x * -1 else abs = x endif Keith www.kjtfs.com shades wrote: [b]ABS is a VBA function (see Walkenbach, -Excel 200 PowerProgramming-, page 871) Just to test it, try this: put a number in cell F6, then use thi code to put absolute value into F7. (Shorter way to do this, bu gives you the idea). Code ------------------- Sub Test() Dim i As Integer i = Range("F6").Value Range("F7").Value = Abs(i) End Sub ------------------- [/B -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel Data Validation/Lookup function does function correcty | Excel Worksheet Functions | |||
copy of excel file not showing formulal/function in the function b | Excel Discussion (Misc queries) | |||
Adding a custom function to the default excel function list | Excel Programming | |||
When I Import an Access Table With an Excel Function in a Cell it Displays as Text not as a Function in Excel | Excel Programming | |||
Excel - saving result of a function without showing the function | Excel Programming |