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 40-8=32.
I can't figure out why it gives me a null value.
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.
IF(PAYGROUP="SAL" .And. TIMECODE="PT1",(STDHRS-TIMECODEHOURS),TIMECODEHOURS)
where the STDHRS=40 and TIMECODEHOURS=10
gives me a result of 10.
I think the result should be 30, because 40-10=30.
I apologize for the error in my previous email.
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!