Solved Move Data to Another Sheet in Next Empty Row

March 20, 2017 at 16:24:51
Specs: Windows 7
Hello!

Can anyone help me write a Marco code?

I have a worksheet with two tabs, a "Projects" tab and a "Completed" tab. The projects tab has projects in each row, and in column C is the "Status" column. When a project is completed, you type "Complete" into the cell in column C.

Once "Complete" is entered into the cell in column C, I would like it to move to the next empty row in the "Completed" tab


Any and all help is appreciated.


See More: Move Data to Another Sheet in Next Empty Row

Reply ↓  Report •


#1
March 21, 2017 at 06:58:22
Check out this thread and modify the code shown in Response #1 as required.

https://www.computing.net/answers/o...

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

message edited by DerbyDad03


Reply ↓  Report •

#2
March 21, 2017 at 09:17:42
I tried that one, but it moves the project to the first row in the "completed" tab and it erases the one that was there, so it's not adding it to the next empty row. How can I fix that?

Reply ↓  Report •

#3
March 21, 2017 at 09:31:56
✔ Best Answer
Do you have data in Column A of the Completed tab? That is the column that is used to determine the next available row. If that Column is empty, VBA will always think that Row 2 is the next available Row

Since you obviously have data in Column C (Complete) try changing this instruction:

nxtRw = Sheets("Complete").Range("A" & Rows.Count).End(xlUp).Row + 1

to

nxtRw = Sheets("Complete").Range("C" & Rows.Count).End(xlUp).Row + 1

(Do not change the A in the next instruction because that tells VBA what Column (not Row) to start the Paste. In other words, you can't copy an entire Row and then start the paste in Column C.)

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

message edited by DerbyDad03


Reply ↓  Report •

Related Solutions

#4
March 21, 2017 at 10:13:18
Thanks a lot! it's working perfectly!

Reply ↓  Report •

Ask Question