I made a function and I couldn\'t figure out why I was getting a value error, the code runs fine and returns the expected value but I still get #VALUE! in the cell afterwards...