I am trying to write code that would find cells containing numbers formatted a certain way and then do some operations on those numbers.
The If statement below is able to identify some formatting, but I can't get it to identify a number with two decimal places.
I would like to change numbers such as 17.55 and ignore whole numbers, such as 17.
I tried both If cell.NumberFormat = "#.##" and If cell.NumberFormat = "0.00" but neither of those works.
When I run If cell.NumberFormat = "0.00%" it is able to find cells containing percentages with that format.
How can I change the If statement to identify only numbers with two decimal places?
Please Login or Register to view this content.
Bookmarks