I use IsNumeric to check if it is a number, then I will need to check if it is positive integer.
How to check if a number is positive integer or not?
Thanks.
I use IsNumeric to check if it is a number, then I will need to check if it is positive integer.
How to check if a number is positive integer or not?
Thanks.
Hi there,
Enter the following code in a standard VBA CodeModule:
Please Login or Register to view this content.
Use the function by entering "=IsPositiveInteger(B3)" in the required cell, where B3 is the address of the cell whose value you wish to test.
Hope this helps - please let me know how you get on.
Regards,
Greg M
Thanks much.
Just another option:
Test:Please Login or Register to view this content.
Please Login or Register to view this content.
Sorry, I should add "And x > 0" to the code in post #4:
Please Login or Register to view this content.
One for luck
Please Login or Register to view this content.
Simply
EditPlease Login or Register to view this content.
Exclude 0positive integer
Last edited by jindon; 03-27-2024 at 09:32 AM.
Even better!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks