Copying cells based on Criteria in VBA

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Tomo1991

Thread Starter
Joined
Jan 13, 2013
Messages
4
Hi All,

Very new to this but have a look at the attachment and see if you can help.

I've used the code

Sub Loading2()
Dim LastRow As Integer

LastRow = Worksheets("Table").Range("A65536").End(xlUp).Row

Sheets("Input").Range("B5,D5,F5,H5,J5,L5,N5").Copy Sheets("Table").Range("A" & LastRow + 1)
Sheets("Input").Range("B5,D5,F5,H5,J5,L5,N5").ClearContents

End Sub
Sub Supplying()

Dim LastRow As Integer

LastRow = Worksheets("Table").Range("A65536").End(xlUp).Row

Sheets("Input").Range("B5,D5,F5,H5,J5,L5,N5").Copy Sheets("Table").Range("A" & LastRow + 1)
Sheets("Table").Range("D" & LastRow + 1).Copy Sheets("Table").Range("H" & LastRow + 1)
Sheets("Table").Range("E" & LastRow + 1).Copy Sheets("Table").Range("I" & LastRow + 1)
Sheets("Table").Range("F" & LastRow + 1).Copy Sheets("Table").Range("J" & LastRow + 1)
Sheets("Table").Range("G" & LastRow + 1).Copy Sheets("Table").Range("K" & LastRow + 1)
Sheets("Input").Range("B5,D5,F5,H5,J5,L5").ClearContents
Sheets("Table").Range("D" & LastRow + 1).ClearContents
Sheets("Table").Range("E" & LastRow + 1).ClearContents
Sheets("Table").Range("F" & LastRow + 1).ClearContents
Sheets("Table").Range("G" & LastRow + 1).ClearContents

End Sub


But basically I need to paste inputs into different sheets depending on the vessel used e.g. Titanic in the sheet Titanic and President in the sheet president.

Can anyone help???
 

Attachments

Joined
May 26, 2011
Messages
255
HI,

You attached a workbook but I do not see an example as to your request.
Please provide an example a before and after code.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top