I am looking for a macro to do the following. In theory, this is what it should do
Sheet 1 - look in column b
If column b = Income then it would take Column C and Column D, copy it, go to sheet 2, paste it into the next empty row and then repeat it until all the data is looked at and copied correctly. A new report will be running daily so it almost acts like a statement of transactions.
I know there is a For loop in this thing, but when i do it, it pastes it into sheet 1, and then deletes it right away. This code is terrible, so any help will be appreciated. Thanks
Sheet 1 - look in column b
If column b = Income then it would take Column C and Column D, copy it, go to sheet 2, paste it into the next empty row and then repeat it until all the data is looked at and copied correctly. A new report will be running daily so it almost acts like a statement of transactions.
I know there is a For loop in this thing, but when i do it, it pastes it into sheet 1, and then deletes it right away. This code is terrible, so any help will be appreciated. Thanks
Code:
Dim cell As Range
Dim cell1 As Range
Dim AssetNumber As Long
AssetNumber = Sheet1.Range("c2:c" & Sheet1.Range("c65536").End(xlUp).Row).Count
Sheet3.Select
' Loop for each row in selection.
For Each cell In Sheet3.Range("e3", Cells(65535, Sheet3.Range("e65536").End(xlToLeft).Column).End(xlUp))
cell.Offset(0, 1).Copy
For Each cell1 In Sheet1.Range("c2:c" & Sheet1.Range("c65536").End(xlToLeft).Column).End(xlUp)
Cells(AssetNumber + 1, 2).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Next cell1
Next cell