rsharma017
New Member
- Joined
- Aug 7, 2017
- Messages
- 7
Sub Populate_TotalDeposit_BankDate()
Dim m_XlCashPostWrkSheet As Worksheet
Set m_XlCashPostWrkSheet = ActiveSheet
Dim mCashPostRowCount As Integer
mCashPostRowCount = m_XlCashPostWrkSheet.UsedRange.Rows.Count
Dim m_XlMatchedDataWrkSheet As Worksheet
Set m_XlMatchedDataWrkSheet = Worksheets("Matched Data")
Dim mMatchedDataRowCount As Integer
mMatchedDataRowCount = m_XlMatchedDataWrkSheet.UsedRange.Rows.Count
m_XlCashPostWrkSheet.Range("U2:U" & mCashPostRowCount).Formula = "=IF(ISERROR(VLOOKUP(A2,'Matched Data'!$B$2:$Y$" & mMatchedDataRowCount & ",22,FALSE)),"""",VLOOKUP(A2,'Matched Data'!$B$2:$Y$" & mMatchedDataRowCount & ",22,FALSE))"
m_XlCashPostWrkSheet.Range("V2:V" & mCashPostRowCount).Formula = "=IF(ISERROR(VLOOKUP(A2,'Matched Data'!$B$2:$Y$" & mMatchedDataRowCount & ",23,FALSE)),"""",VLOOKUP(A2,'Matched Data'!$B$2:$Y$" & mMatchedDataRowCount & ",23,FALSE))"
End Sub
Dim m_XlCashPostWrkSheet As Worksheet
Set m_XlCashPostWrkSheet = ActiveSheet
Dim mCashPostRowCount As Integer
mCashPostRowCount = m_XlCashPostWrkSheet.UsedRange.Rows.Count
Dim m_XlMatchedDataWrkSheet As Worksheet
Set m_XlMatchedDataWrkSheet = Worksheets("Matched Data")
Dim mMatchedDataRowCount As Integer
mMatchedDataRowCount = m_XlMatchedDataWrkSheet.UsedRange.Rows.Count
m_XlCashPostWrkSheet.Range("U2:U" & mCashPostRowCount).Formula = "=IF(ISERROR(VLOOKUP(A2,'Matched Data'!$B$2:$Y$" & mMatchedDataRowCount & ",22,FALSE)),"""",VLOOKUP(A2,'Matched Data'!$B$2:$Y$" & mMatchedDataRowCount & ",22,FALSE))"
m_XlCashPostWrkSheet.Range("V2:V" & mCashPostRowCount).Formula = "=IF(ISERROR(VLOOKUP(A2,'Matched Data'!$B$2:$Y$" & mMatchedDataRowCount & ",23,FALSE)),"""",VLOOKUP(A2,'Matched Data'!$B$2:$Y$" & mMatchedDataRowCount & ",23,FALSE))"
End Sub