Vanishing data when rows are copied between worksheets

T

tercerojista

I have a problem that I can't solve. I have an Excel workbook with
two worksheets. One worksheet shows all "Outstanding" issues, the
other shows all "Resolved" issues. The structure of the worksheets is
identical. When an issue is resolved, the status of the issue on the
"Outstanding" worksheet changes to "Resolved". Then, when the "Update
workbook" button is pressed, the details of the issue - the entire
range for that row, including both hidden and visible columns - are
moved from the "Outstanding" sheet to the "Resolved" sheet.

When I test this code, everything works without any problems. But on
occasion, when the data is copied across, some or all of the data is
lost. Sometimes, issues have vanished completely. Sometimes, only
some of the data has been copied across.

My hunch is that this problem is related to the hidden columns. Has
anyone else experienced anything similar, or do you have any
suggestions as to what may be going wrong? Like I say, I can't
recreate the problem. I've taken the last saved version of workbooks
where this has happened, and tested it, and everything worked fine.
But I'm reluctant to put this down to something that the users are
doing, as I can't see how they'd get the workbooks to do this either
(without a lot of work on their part).
 
S

Suzette

Are you copying the entire row or each cell?

Another idea would be to put the data in an Access Database. You could have
reports show the Outstanding and the Resolved items without so much work.
 
T

tercerojista

I'm copying each cell - well, a collection of cells. The range is not
the entire row, but the range is made up of adjacent cells, some of
which are hidden. I can't cut and paste the entire row, because there
are program columns that mustn't be removed.

Regarding Access - I am aware that this system would be better off in
a database, but this is not an option. I'm really just interested in
figuring out why data is vanishing. Like I say, whenever I test the
code, it works fine. But I know that, on occasion, it must be messing
up.
 
S

Suzette

Try doing is a single cell at a time. I just finished doing a macro to do
the same thing including hidden columns. I don't have any problems with it
losing any information.
 
Y

yippee_yippee_yay

I've modified the code now so that it copies each cell into an array,
and then copies the data back to the corresponding worksheet before
deleting the original data. Let's see if this holds up. It seems
like a more definite way of doing things, rather than relying on a
simple copy and paste job.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top