Hi all,
I'm working on a macro that can convert something like
into -
What I began with was a simple loop:
I utilized the next column (AH) over adding the formula
copied that down and formatted AH to wrap.
My issue I foresee is one of the codes being a match as part of a word and throwing a wrench into it. As an example, if there is a code "ATE" that equals "Heated Seats (Front)" and is ran after "Heated Seats (Rear)", then I would get "HeHeated Seats (Front)d Seats (Rear)".
I had thought to look specifically for "ATE, " in the above example, that would solve my dilemma, however the last code would always create confusion as there isn't the helping qualifier of ", ".
Thank you
I'm working on a macro that can convert something like
4A4, 9VL, Q2J, QJ4, 4D3, PV3 |
into -
Heated Seats (Rear) BOSE® Surround Sound System Ventilated Seats (Front) Power Seats (14-way) with Comfort Memory Adaptive Cruise Control incl. Lane Keep Assist (LKA) HD-Matrix Design LED Headlights |
What I began with was a simple loop:
Code:
For a = 2 To LastRow
b = "AG"
If Range(b & a) = "4A4" Then Range(b & a) = "Heated Seats (Rear)"
If Range(b & a) = "9VL" Then Range(b & a) = "BOSE® Surround Sound System"
If Range(b & a) = "Q2J" Then Range(b & a) = "Ventilated Seats (Front)"
If Range(b & a) = "QJ4" Then Range(b & a) = "Power Seats (14-way) with Comfort Memory"
If Range(b & a) = "4D3" Then Range(b & a) = "Adaptive Cruise Control incl. Lane Keep Assist (LKA)"
If Range(b & a) = "PV3" Then Range(b & a) = "HD-Matrix Design LED Headlights"
Next a
I utilized the next column (AH) over adding the formula
Code:
=SUBSTITUTE(AG2,", ",CHAR(10))
My issue I foresee is one of the codes being a match as part of a word and throwing a wrench into it. As an example, if there is a code "ATE" that equals "Heated Seats (Front)" and is ran after "Heated Seats (Rear)", then I would get "HeHeated Seats (Front)d Seats (Rear)".
I had thought to look specifically for "ATE, " in the above example, that would solve my dilemma, however the last code would always create confusion as there isn't the helping qualifier of ", ".
Thank you