I'm working with a dataset and I have written a loop to check if the cell two below a found instance of a string contains a certain value. If it doesn't I want to concatenate the value of that cell with the cell one below the found cell. And then I want to loop this until the cell two below the found value contains the required string.
I'm sorry if this is confusing, but the code should hopefully speak for itself:
Everything works fine except for the line
which gives a 'run-time error 1004: Application-defined or object-defined error'
So if the data is:
Ship to
UK
USA
I want it to concatenate the line two below 'Ship to' (i.e. USA) with the line one below 'Ship to' (i.e. UK) so the cell reads 'UK, USA'.
So the equivalent of
for example. But variable depending on the location of the found string.
Again, sorry if this is confusing. Thanks for any help!
Bookmarks