Concatenation using For Next Loop

  • Hello Everybody


    Was after a bit a help if possible....


    I'm getting my knickers in a twist over this and to make it more annoying I know that I'm doing something really stupid.


    As part of a script I'm tring to concatenate the contents of column C with column H - the results to appear in column R. It will be an unknown and ever changing amount of rows.


    I believe that it's the value for field 'NewField' that's causing most problems, but it could be other stuff.


    Any help appreciated.


    Thanks v much
    B


  • Re: Concatenation using For Next Loop


    I think you need to take a look at how you defined your variables first. I believe you want LastRow to be set as Long.


    I can't really tell how NewField is coming into play as a string either.

  • Re: Concatenation using For Next Loop


    Does this do what youre looking for?



    ?


    Ger

    _______________________________________________
    There are 10 types of people in the world. Those that understand Binary and those that dont. :P


    Why are Halloween and Christmas the same? Because Oct 31 = Dec 25... ;)

    _______________________________________________

  • Re: Concatenation using For Next Loop


    What's First?


    It doesn't seem to be getting defined/declared anywhere.


    Also there's no need for a loop.

    Boo!:yikes:

  • Re: Concatenation using For Next Loop


    Thanks people for replying. Ger Plante's code was what I was trying to achieve and it works so thank you.


    Thanks also, Norie. My inefficiency duly noted ;-). Whenever I try some VBA I always go for the hardest solution....need more practice.


    Thanks again.
    B

  • Re: Concatenation using For Next Loop


    Thanks for posting back Bertie... practice makes perfect... stick at it.


    For reference, Nories code is immeasurably more efficient, but as I say, thats what comes from practice.


    Ger

    _______________________________________________
    There are 10 types of people in the world. Those that understand Binary and those that dont. :P


    Why are Halloween and Christmas the same? Because Oct 31 = Dec 25... ;)

    _______________________________________________

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!