Thanks for your code, It would be great if you could help me in editing the function that I have posted. Most of my scripts use that function. It would be really helpful for me if you could assist me in editing the function to check negatives as well