Hi expert out there,
Need to seek your advice. Currently I have coding as shown below whereby I have hard coded the sheets("Estmt").
The problem is users maybe using Estmt tab or Citistmt tab for their data. So I want it to prompt user to input the sheet and then it will link to the sheet and macro will do the classify as shown in my coding below.
Thanks in advance for your help!
==========================
Sub ClassificationD()
Dim lr As Long, r As Long
lr = Sheets("Estmt").Cells(Rows.Count, "C").End(xlUp).Row
For r = lr To 1 Step -1
' Classify - REPATRIATION
If Sheets("Estmt").Range("C" & r) Like "*REPAT*" Or Sheets("Estmt").Range("C" & r) Like "*SOUTH SHADY*" Then
Sheets("Estmt").Range("E" & r).Copy Destination:=Sheets("Estmt").Range("F" & r)
End If
If Sheets("Estmt").Range("B" & r) Like "*DEBIT TRFR*" And Sheets("Estmt").Range("C" & r) Like "*INTER-CO SETTLE*" Or Sheets("Estmt").Range("B" & r) Like "*OUT.T.T*" And Sheets("Estmt").Range("C" & r) Like "*INTER-CO SETTLE*" Or Sheets("Estmt").Range("B" & r) Like "*CREDIT REMIT*" And Sheets("Estmt").Range("C" & r) Like "*INTER-CO SETTLE*" Then
Sheets("Estmt").Range("E" & r).Copy Destination:=Sheets("Estmt").Range("F" & r) '-This is for JP
End If
Need to seek your advice. Currently I have coding as shown below whereby I have hard coded the sheets("Estmt").
The problem is users maybe using Estmt tab or Citistmt tab for their data. So I want it to prompt user to input the sheet and then it will link to the sheet and macro will do the classify as shown in my coding below.
Thanks in advance for your help!
==========================
Sub ClassificationD()
Dim lr As Long, r As Long
lr = Sheets("Estmt").Cells(Rows.Count, "C").End(xlUp).Row
For r = lr To 1 Step -1
' Classify - REPATRIATION
If Sheets("Estmt").Range("C" & r) Like "*REPAT*" Or Sheets("Estmt").Range("C" & r) Like "*SOUTH SHADY*" Then
Sheets("Estmt").Range("E" & r).Copy Destination:=Sheets("Estmt").Range("F" & r)
End If
If Sheets("Estmt").Range("B" & r) Like "*DEBIT TRFR*" And Sheets("Estmt").Range("C" & r) Like "*INTER-CO SETTLE*" Or Sheets("Estmt").Range("B" & r) Like "*OUT.T.T*" And Sheets("Estmt").Range("C" & r) Like "*INTER-CO SETTLE*" Or Sheets("Estmt").Range("B" & r) Like "*CREDIT REMIT*" And Sheets("Estmt").Range("C" & r) Like "*INTER-CO SETTLE*" Then
Sheets("Estmt").Range("E" & r).Copy Destination:=Sheets("Estmt").Range("F" & r) '-This is for JP
End If