I have DailyBilling & MasterBilling sheet. I have to copy data as per date from DailyBilling and paste in MasterBilling Sheet. Also in DailyBilling sheet have YES, NO but we need to add both column data in total column in MasterBilling sheet. Now Jan 06 data need to copy paste in masterbilling sheet. Find the sample sheet.
I am using RE.
Dim filteredRows = dtDailyBilling.AsEnumerable().Where(Function(row)
Dim dateValue As DateTime
Return DateTime.TryParse(row("Bot Run Date").ToString(), dateValue) AndAlso dateValue.Date = DateTime.Now.Date
End Function)
If filteredRows.Any() Then
Dim filteredDataTable As DataTable = dtMasterBilling.Clone
For Each row As DataRow In filteredRows
filteredDataTable.Rows.Add({ row("Bot Run Date"), row("Insurance"), CDbl(row("YES")) + CDbl(row("NO")), row("Total Patients"), row("Success"), row("Exception")})
Next
dtMasterBilling.Merge(filteredDataTable, True, MissingSchemaAction.Add)
End If