Re: formualae to export row from one sheet to another paid invoices
Hello,
Copy the following code into a VB module and run it and it will do what I believe you are trying to do. There is unfortunately no formula that I am aware of that would do what you are wanting that can show them all like this so VBA is the only way to go here. It looks up the value in column E and checks for "Paid" if it finds it then it copies that row into the "Remittances" Sheet. Hope This Helps!!!
Code
Sub PlaceRowsIntoRemittance()
Dim X, Y As Long
X = 1
Sheets("Remittances").Select
Range("A1").Select
'Cells.Select ' To delete the contents on Remittances Sheet before writing to it remove comment marks on these two lines
'Selection.Delete Shift:=xlUp
If Range("A1") <> "" Then
Selection.SpecialCells(xlCellTypeLastCell).Select 'Also comment this line out if you want to delete everything on remittances
End If
Y = ActiveCell.Row + 1
Do
If Sheets("z purchase book").Range("E" & X) = "Paid" Then
Sheets("z purchase book").Select
Rows(X & ":" & X).Select
Selection.Copy
Sheets("Remittances").Select
Rows(Y & ":" & Y).Select
ActiveSheet.Paste
Y = Y + 1
End If
X = X + 1
Loop Until Sheets("z purchase book").Range("A" & X) = ""
End Sub
Display More