Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello all, could somebody please tell me how to do the above in my code,
i am subtracting two dates and get a - value and would like to remove the minus. My variable is long. Best regards, Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
myVar = Abs(myVar)
-- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Les Stout" wrote in message ... Hello all, could somebody please tell me how to do the above in my code, i am subtracting two dates and get a - value and would like to remove the minus. My variable is long. Best regards, Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just multiply the value by -1 to switch signs:
V = V * -1 To ensure it is always negative, use V = Abs(V) * -1 -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting www.cpearson.com (email on the web site) "Les Stout" wrote in message ... Hello all, could somebody please tell me how to do the above in my code, i am subtracting two dates and get a - value and would like to remove the minus. My variable is long. Best regards, Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have solved it with the following thanks you...
dteDiff = Abs(dteDiff) Best regards, Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try
x = -1 x = Abs(x) Mike "Les Stout" wrote: Hello all, could somebody please tell me how to do the above in my code, i am subtracting two dates and get a - value and would like to remove the minus. My variable is long. Best regards, Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you all for the input, much appreciated... :0)
Best regards, Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Type change in a declared Variable? | Excel Programming | |||
change firstrow variable to be the 2nd row value instead of the fi | Excel Programming | |||
Change variable permanently | Excel Programming | |||
Sheets reference change variable | Excel Programming | |||
change the number of rows to a variable | Excel Programming |