I have a formula I can use that checks the value in cell A2 to see if it contains a proper part number, formatted as four digits, a dash, and four more digits, like so: "0000-0000". This formula does that nicely, it returns "yes" or "no":
I would like a way to perform this logical test inside of VBA code, without having to add a column and insert this formula on the sheet directly. If I assign Range("A2").value to the variable "PartNumber", how would I write the above formula as an "If Then" code? What would I replace the "??????" with below?
Any help would be appreciated, thanks!
Bookmarks