Hi,
I have a scenario where I have to ensure all Apartment unit numbers are consistent since they are referring to the same type with the maximum length 9 alphanumeric including 2 hyphens and the position of hyphen always located after the number e.g. C-07-02 or C5-07-02 or C5-13A-13
Further, alphabet "A" is always located after the number e.g. 13A or 03A
E.g. No1
Col A Result
C-7-02 ---------> C-07-02
C-07-2 ---------> C-07-02
C-7-2 ---------> C-07-02
C-07-02 ---------> C-07-02 (ok)
B3-7-10 ---------> B3-07-10
B3-11-5 ---------> B3-11-05
B3-11-05 --------> B3-11-05 (ok)
B3-11-15 --------> B3-11-15 (ok)
E.g. No2
Col A Result
A1-13A-8 --------> A1-13A-08
D-03A-6 --------> D-03A-06
D-3A-06 ---------> D-03A-06 (ok)
D-3A-6 ---------> D-03A-06
B5-13A-15 --------> B5-13A-15 (ok)
In this case, how to use excel formula or VBA to fix the following in order to achieve the above results :
1) the last 4 digits number after 1st hyphen to the left under example No1
07-02 for 7-02,07-2 and 7-2
07-10 for 7-10 1
11-05 for 11-5
2) the last 4 digits number with 1 alphabet "A" after 1st hyphen to the left under example No2
03A-06 for 03A-6, 3A-06 and 3A-6
13A-08 for 13A-8
Any help will be much appreciated
Thanks
Regards
Len
I have a scenario where I have to ensure all Apartment unit numbers are consistent since they are referring to the same type with the maximum length 9 alphanumeric including 2 hyphens and the position of hyphen always located after the number e.g. C-07-02 or C5-07-02 or C5-13A-13
Further, alphabet "A" is always located after the number e.g. 13A or 03A
E.g. No1
Col A Result
C-7-02 ---------> C-07-02
C-07-2 ---------> C-07-02
C-7-2 ---------> C-07-02
C-07-02 ---------> C-07-02 (ok)
B3-7-10 ---------> B3-07-10
B3-11-5 ---------> B3-11-05
B3-11-05 --------> B3-11-05 (ok)
B3-11-15 --------> B3-11-15 (ok)
E.g. No2
Col A Result
A1-13A-8 --------> A1-13A-08
D-03A-6 --------> D-03A-06
D-3A-06 ---------> D-03A-06 (ok)
D-3A-6 ---------> D-03A-06
B5-13A-15 --------> B5-13A-15 (ok)
In this case, how to use excel formula or VBA to fix the following in order to achieve the above results :
1) the last 4 digits number after 1st hyphen to the left under example No1
07-02 for 7-02,07-2 and 7-2
07-10 for 7-10 1
11-05 for 11-5
2) the last 4 digits number with 1 alphabet "A" after 1st hyphen to the left under example No2
03A-06 for 03A-6, 3A-06 and 3A-6
13A-08 for 13A-8
Any help will be much appreciated
Thanks
Regards
Len