excel - Issue with Copying Data From One Sheet to Another -


I have developed a script by looping the method to copy data from one sheet to another and then refreshed the first field The script works well except for a problem. Within the second sheet, it is going to find the last non-empty cell in column A (i.e. 'x') and the problem before the data from the next line is that it is' x + 11 Sticking data in line '.

Why do I need help to recognize this?

Note that here I = 11, because the row 10 in the data is a header and the required data starts with the 11th line

Here's the macro I have done: < Pre> option to clear sub copy paste () I have long integer dim as long as x squared as long range i = 11 while cell (i, 1). Value & lt; & Gt; "ActiveSheet.CopyPast x = iy = 0" for each C for worksheets ("CDS") Range (cell (x, 1), cell (x, 11) worksheets ("databank") Category ("A0000") (X, y) = offset (x, y) = cy = y + 1x = 0 next c application. Kootchopymode = false i = i + 1 loop ("CDS") with sheets ("A11: 65"). Ending termination with sub-expiry

< Div class = "post-text" itemprop = "text">

That's because you're using that offset that increases from one to 11 and for each recurrence of the loop.

Change: Worksheets ("Databank"). Range ("a10000"). For the end (xlUp) .offset (x, y) = c

: worksheets ("databank"). Room (rows.account, y + 1). End (xlUp). Offset (1, 0) = c

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -