I would like to find a better way to record when a new row of information is populated in a data set. Currently I have some code that checks when the values are populated in adjacent columns C,D and E, once a value is populated in all of them it records the sheet name and row address in a separate sheet. Its incredibly slow however and I was wondering if anyone has a better way of accomplishing this? Essentially record row address when multiple values have been entered in the row.
This is my code currently -
If anyone had any suggestions or suggestions or learning resources it would be greatly appreciated.
I'm hoping to get more information; have already asked this question on StackOverflow under: VBA Record when a new row is populated
This is my code currently -
VBA Code:
Dim srg As Range: Set srg = Intersect(irg.EntireRow, crg)
Dim sName As String: sName = ActiveSheet.Name
Dim dws As Worksheet: Set dws = Worksheets(dName)
Dim dfCell As Range: Dim ddcrg As Range: Set ddcrg = dws.Columns(dcCol)
Dim arg As Range
Dim rrg As Range
Dim srAddress As String
Dim ddFound As Range
For Each arg In srg.Areas
For Each rrg In arg.Rows
srAddress = sName & "!" & rrg.Address(0, 0)
Set ddFound = ddcrg.Find(srAddress, , xlFormulas, xlWhole)
If Application.CountBlank(rrg) = 0 Then
If ddFound Is Nothing Then
With Sheets("Log")
Set dfCell = dws.Cells(dws.Rows.Count, dCol) _
.End(xlUp).Offset(1)
dfCell.Value = Format(Date, "mm/dd/yyyy")
dfCell.Offset(, 1).Value = ActiveSheet.Name
dfCell.Offset(, 2).Value = srAddress
End With
End If
End If
Next
Next
If anyone had any suggestions or suggestions or learning resources it would be greatly appreciated.
I'm hoping to get more information; have already asked this question on StackOverflow under: VBA Record when a new row is populated