
simple subtraction
Grant Perkins May 15, 2014 9:54 AM (in response to pth3x _)Hi pth3x and welcome to the forum.
Can you tell us what result your formula gives you?
Grant


simple subtraction
pth3x _ May 15, 2014 9:54 AM (in response to pth3x _)Hi Bruce & Grant,
Yes, the result is null.
This confuses me because STDHRS has a numeric value of 40 in the cell and TIMECODEHRS has a numeric value of 8 in the cell.
This makes me think neither field is null, since there is an 8 in one and a 40 in the other.
But perhaps there is something wrong with that reasoning.
I thought the formula would give me a result of 408=32.
I can't figure out why it gives me a null value.
Thank you,
patrick

simple subtraction
pth3x _ May 15, 2014 9:54 AM (in response to pth3x _)When I sent that reply a moment ago, I was looking at the wrong column.
The equation doesn't give me a null result, but it doesn't give me the result I want.
The formula:
IF(PAYGROUP="SAL" .And. TIMECODE="PT1",(STDHRSTIMECODEHOURS),TIMECODEHOURS)
where the STDHRS=40 and TIMECODEHOURS=10
gives me a result of 10.
I think the result should be 30, because 4010=30.
I apologize for the error in my previous email.

simple subtraction
Bruce _ May 15, 2014 9:54 AM (in response to pth3x _)Ptx
The formula looks correct, but something is off.
Can you look at the formula in the test box? Use a few numbers and see what the result is.
By your output I suspect that STDHOURS is showing 0 somehow. Is SDTHOURS a calculated field, or a number off the report?

simple subtraction
pth3x _ May 15, 2014 9:54 AM (in response to pth3x _)Hi Bruce,
Thank you for verifying that the formula was correct, because that made me look elsewhere
Indeed the trap I'd created for the TIMECODE was one space too large on the left, which put in a leading space.
Once I edited the trap and removed the space, it does the subtraction fine.
I appreciate you assistance!
patrick