CurtisMiddleton
6 years agoQrew Trainee
Formula Not Functioning as Expected
Hi,
Can someone please help me with the following formula. I have comments under each line as to what it should be doing, but it is not doing that. It is just displaying zero.
If([Spent By]=ToUser("John Doe") and [Shared Purchase?]=true, [Amount]/2,
//If user is John Doe and Checkbox is checked, display the amount divided by two, otherwise execute next if statement.
If([Spent By]!=ToUser("John Doe") and [Shared Purchase?]=true, [Amount]/2,
//If user is not John Doe and Checkbox is checked, display the amount divided by two, otherwise execute next if statement.
If([Spent By]=ToUser("John Doe") and [Shared Purchase?]=false, [Amount], 0)))
//If user is John Doe and Checkbox is NOT checked, display the amount, otherwise display 0.
I also tried adding a couple extra sets of parentheses to break it up more, but that didn't work either.
------------------------------
Curtis Middleton
------------------------------
Can someone please help me with the following formula. I have comments under each line as to what it should be doing, but it is not doing that. It is just displaying zero.
If([Spent By]=ToUser("John Doe") and [Shared Purchase?]=true, [Amount]/2,
//If user is John Doe and Checkbox is checked, display the amount divided by two, otherwise execute next if statement.
If([Spent By]!=ToUser("John Doe") and [Shared Purchase?]=true, [Amount]/2,
//If user is not John Doe and Checkbox is checked, display the amount divided by two, otherwise execute next if statement.
If([Spent By]=ToUser("John Doe") and [Shared Purchase?]=false, [Amount], 0)))
//If user is John Doe and Checkbox is NOT checked, display the amount, otherwise display 0.
I also tried adding a couple extra sets of parentheses to break it up more, but that didn't work either.
------------------------------
Curtis Middleton
------------------------------
- Try this one
If(UserToName([Spent By], "FF")="John Doe" and [Shared Purchase?]=true, [Amount]/2, //If user is John Doe and Checkbox is checked, display the amount divided by two, otherwise execute next if statement. UserToName([Spent By], "FF")!="John Doe" and [Shared Purchase?]=true, [Amount]/2, //If user is not John Doe and Checkbox is checked, display the amount divided by two, otherwise execute next if statement. UserToName([Spent By], "FF")!="John Doe" and [Shared Purchase?]=false, [Amount], 0) //If user is John Doe and Checkbox is NOT checked, display the amount, otherwise display 0.
------------------------------
Everett Patterson
------------------------------