I am trying to write a macro for the following:
<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-comffice:smarttags" /><st1:State w:st="on"><st1lace w:st="on">Col</st1lace></st1:State> A has a number of values and that can have the same value on different rows. <st1:State w:st="on"><st1lace w:st="on">Col</st1lace></st1:State> b has another value. Where column A has the same value ie 5800, I would like it to then put in a new column (col C) all the values of col B where col a values match. As an example:
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o> </o>
<st1:State w:st="on">Col</st1:State> A <st1:State w:st="on">Col</st1:State> B <st1:State w:st="on"><st1lace w:st="on">Col</st1lace></st1:State> C
5800 <st1:City w:st="on"><st1lace w:st="on">Brisbane</st1lace></st1:City> Brisbane, Logan
5800 <st1:City w:st="on"><st1lace w:st="on">Logan</st1lace></st1:City> Brisbane, Logan
5801 Gold Coast Gold Coast
5802 Gympie Gympie
5803 Ipswich Ipswich, <st1:City w:st="on"><st1lace w:st="on">Cairns</st1lace></st1:City>, Townsville
5803 <st1:City w:st="on">Cairns</st1:City> Ipswich, <st1:City w:st="on"><st1lace w:st="on">Cairns</st1lace></st1:City>, Townsville
5803 Townsville Ipswich, <st1:City w:st="on"><st1lace w:st="on">Cairns</st1lace></st1:City>, Townsville
I can do this manually but it is very time consuming
Many thanks for your help
<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-comffice:smarttags" /><st1:State w:st="on"><st1lace w:st="on">Col</st1lace></st1:State> A has a number of values and that can have the same value on different rows. <st1:State w:st="on"><st1lace w:st="on">Col</st1lace></st1:State> b has another value. Where column A has the same value ie 5800, I would like it to then put in a new column (col C) all the values of col B where col a values match. As an example:
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o> </o>
<st1:State w:st="on">Col</st1:State> A <st1:State w:st="on">Col</st1:State> B <st1:State w:st="on"><st1lace w:st="on">Col</st1lace></st1:State> C
5800 <st1:City w:st="on"><st1lace w:st="on">Brisbane</st1lace></st1:City> Brisbane, Logan
5800 <st1:City w:st="on"><st1lace w:st="on">Logan</st1lace></st1:City> Brisbane, Logan
5801 Gold Coast Gold Coast
5802 Gympie Gympie
5803 Ipswich Ipswich, <st1:City w:st="on"><st1lace w:st="on">Cairns</st1lace></st1:City>, Townsville
5803 <st1:City w:st="on">Cairns</st1:City> Ipswich, <st1:City w:st="on"><st1lace w:st="on">Cairns</st1lace></st1:City>, Townsville
5803 Townsville Ipswich, <st1:City w:st="on"><st1lace w:st="on">Cairns</st1lace></st1:City>, Townsville
I can do this manually but it is very time consuming
Many thanks for your help