Hello,
I am working on taking data from one sheet, and saving into a new format to push into computer system. Our job number format is W1234[year][-rev#].
i need to remove the year# (and -rev if it exists). This will be used to populate other cells which do not care about the full W#. I cannot always remove the last 2 digits, because if there was a rev, I would need to remove the last 4 digits from the cell. I also cannot remove all "17" or "18" since those could be in the middle of the W#.
either of these values ccould be in cell J3.
w123418
w123417-1
need vba to shorten J3 to: w1234
I was thinking: if -, remove last 4 digits, if not, remove last 2 digits. I am not sure how to do this though. I am thinking this would be easy but i am having trouble finding what terms to use while searching this forum.
Thanks
I am working on taking data from one sheet, and saving into a new format to push into computer system. Our job number format is W1234[year][-rev#].
i need to remove the year# (and -rev if it exists). This will be used to populate other cells which do not care about the full W#. I cannot always remove the last 2 digits, because if there was a rev, I would need to remove the last 4 digits from the cell. I also cannot remove all "17" or "18" since those could be in the middle of the W#.
either of these values ccould be in cell J3.
w123418
w123417-1
need vba to shorten J3 to: w1234
I was thinking: if -, remove last 4 digits, if not, remove last 2 digits. I am not sure how to do this though. I am thinking this would be easy but i am having trouble finding what terms to use while searching this forum.
Thanks