EDIT - I figured it out. Nevermind.
Can someone help with this? I don't understand why the 'x' variable is undefined. Any help would be greatly appreciated
I think your issue is the evaluation equal sign at the end of the function definition,
Get rid of that and see if it helps.
(BTW, what are the definitions of p and wDL?
Can you post the sheet?