How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask Richard Your Own Question
Richard
Richard, Software Specialist
Category: Microsoft Office
Satisfied Customers: 36777
Experience:  Over 15 year experience resolving Microsoft Office Issues
32989067
Type Your Microsoft Office Question Here...
Richard is online now
A new question is answered every 9 seconds

What I am trying to do is… If column I has an “X” I need

This answer was rated:

What I am trying to do is…

If column I has an “X” I need that entire row to move to a different worksheet (DrP)and be deleted from PBC Worksheet. When I record it, it will work but only for those specific rows. The rows change depending on the data in the work sheet

Any advice that you can give me I would really appreciate!
Welcome To Just Answer!

Hey there :)

This will do what you want...




Sub CopyPaste()


r = 1

lastRow = Sheets("PBC").Range("I65536").End(xlUp).Row

For i = 1 To lastRow

If Sheets("PBC").Range("I" & i) = "x" Then

Sheets("PBC").Range("I" & i).EntireRow.Cut Sheets("DrP").Range("A" & r)

r = r + 1

End If

Next i


End Sub



You may have to make small changes but I believe it should be correct the first try :)

Please let me know..

Cheers
Customer: replied 3 years ago.

I am getting Run Time Error '9'
Subscript out of Range

If you will upload your workbook to www.wikisend.com I will happily fix it for you :)


After upload copy the Download link and paste it here :)

Thanks
Customer: replied 3 years ago.

http://wikisend.com/download/296926/PEPSI VOLUME 1Q13.xlsx I copy a COF to Worksheet tab if there is an X in Column 'I' I would like the data to move to DrPepper Worksheet and be deleted from Worksheet tab Thank You!

Thanks,

I have your file and am fixing it now :)
For some reason your file keeps crashing on me. I was unable to repair it. I am going to have to pass this question to other Experts. Good luck :)


Please don't reply back until your new expert joins you.

P.S my code works fine but your file is corrupted.
Thank you for your question, my name is Richard.

Can you upload another copy of the file incase please

- Click the following link: http://www.wikisend.com
- Upload the file to that website
- Once it is uploaded, the resulting page will display a "File ID" number.
- Please, give me that "File ID Number"

Thank you
Customer: replied 3 years ago.


File ID Number 48966 http://wikisend.com/download/489916/PEPSI VOLUME 1Q13.xlsx

Thank you, XXXXX XXXXX done

Go to www.wikisend.com

File ID # XXXXX

The Macro is called JA

If you have any problems, or would like any additional information or assistance, please do not hesitate to let me know.

And if you can take a second to rate my service, that would be greatly appreciated.

Thank you
Customer: replied 3 years ago.

I hate to bother you again but, the macro is moving all Rows from 'data sheet' with X in column I to the Dr Pepper sheet. What I need it to do is... when I paste a certain COF in the 'worksheet tab' for those rows on the 'worksheet tab' with X in column I to move to DrPepper sheet. Thank you so much for your help

A customer is never a bother, so please tell me whatever it is to get to the results you require.

This has been done and you can download it under File ID 270278

Let me know if you have any difficulties please

Thank you
Customer: replied 3 years ago.

I'm still having trouble. For example, when I filter data tab and select COF 1014 and paste that info in worksheet tab. I run the macro and the only thing that happens is that my hearder (Row2) moves to Dr Pepper sheet

Do the steps up to just before running the Macro

then let me look at the sheet

- Click the following link: http://www.wikisend.com
- Upload the file to that website
- Once it is uploaded, the resulting page will display a "File ID" number.
- Please, give me that "File ID Number"
Customer: replied 3 years ago.


File ID 704942

The Macro had been removed in your version

Download File ID#486596

And run the macro please

Let me know if you have any difficulties please

Customer: replied 3 years ago.


Almost...I ran Macro on worksheet tab it moved 4 of the eight rows that were to be moved to Dr Pepper tab. I saved and uploaded fileID 217362

ok, when we changed sheets, a Bug was introduced.

This is fixed

File ID #261514

My Apologies.

Richard, Software Specialist
Category: Microsoft Office
Satisfied Customers: 36777
Experience: Over 15 year experience resolving Microsoft Office Issues
Richard and 3 other Microsoft Office Specialists are ready to help you
Customer: replied 3 years ago.


Perfect! THANK YOU!

Related Microsoft Office Questions