Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a sub that checks if the contents of cells in two rows are the same.
The cells contain numbers that are paset from another program. If they are not the same I want to see how big the absolute difference is between the two cells. I do not know how to write the difference in absoulte terms, so I need help with that. My code is: If rng4.Offset(l, 0) < 0 And rng3.Offset(l, 0) Then dblLocalReturnDiff = rng4.Offset(l, 0) - rng3.Offset(l, 0) If dblLocalReutrnDiff errorMarginal Then... It is on the last row that I am interesetd in using the absoulte value for the difference. Please help me! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Sally,
Try: dblLocalReturnDiff = Abs(Abs(rng4.Offset(l, 0)) _ - Abs(rng3.Offset(l, 0))) --- Regards, Norman "Sally Mae" wrote in message ... I have a sub that checks if the contents of cells in two rows are the same. The cells contain numbers that are paset from another program. If they are not the same I want to see how big the absolute difference is between the two cells. I do not know how to write the difference in absoulte terms, so I need help with that. My code is: If rng4.Offset(l, 0) < 0 And rng3.Offset(l, 0) Then dblLocalReturnDiff = rng4.Offset(l, 0) - rng3.Offset(l, 0) If dblLocalReutrnDiff errorMarginal Then... It is on the last row that I am interesetd in using the absoulte value for the difference. Please help me! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If ABS(dblLocalReturnDiff ) errorMarginal Then...
! Regards, Stefi €˛Sally Mae€¯ ezt Ć*rta: I have a sub that checks if the contents of cells in two rows are the same. The cells contain numbers that are paset from another program. If they are not the same I want to see how big the absolute difference is between the two cells. I do not know how to write the difference in absoulte terms, so I need help with that. My code is: If rng4.Offset(l, 0) < 0 And rng3.Offset(l, 0) Then dblLocalReturnDiff = rng4.Offset(l, 0) - rng3.Offset(l, 0) If dblLocalReutrnDiff errorMarginal Then... It is on the last row that I am interesetd in using the absoulte value for the difference. Please help me! |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Sally.
Another interpretation of your question would be: dblLocalReturnDiff = Abs(rng4.Offset(l, 0) - rng3.Offset(l, 0)) The first suggestion returns the absolute value of the difference of the absolute cell values; the latter expression returns the absolute value of the difference of cell values. --- Regards, Norman "Norman Jones" wrote in message ... Hi Sally, Try: dblLocalReturnDiff = Abs(Abs(rng4.Offset(l, 0)) _ - Abs(rng3.Offset(l, 0))) --- Regards, Norman |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Absolute cell reference will not remain absolute. | Excel Worksheet Functions | |||
Absolute Value | Excel Worksheet Functions | |||
absolute value | Excel Worksheet Functions | |||
How can I do an Absolute Cell Reference but non Absolute Cell Pais | Excel Programming | |||
How can I do an Absolute Cell Reference but non Absolute Cell Pais | Excel Programming |