Below is my code
I get an error 1004
"Application-defined or object-defined error" on the line in red.
Sheets(1).Select
iStart = 38
'iEnd = Range("A" & iStart).End(xlDown).Row
Set f = CreateObject("scripting.dictionary")
With f
For Each h In Range("E39:E108").Value
'd.CompareMode = vbTextCompare
If Cells(iStart, "J").Value = "" Then
.Item(h) = .Item(h) + 1
iStart = iStart + 1
End If
Next h
Sheets(6).Range("K4").Resize(.count).Insert xlDown
Sheets(6).Range("J4").Resize(.count) = Application.Transpose(.Items)
Is there a way to solve this problem or is there another way of doing what I am trying to do ?
I get an error 1004
"Application-defined or object-defined error" on the line in red.
Sheets(1).Select
iStart = 38
'iEnd = Range("A" & iStart).End(xlDown).Row
Set f = CreateObject("scripting.dictionary")
With f
For Each h In Range("E39:E108").Value
'd.CompareMode = vbTextCompare
If Cells(iStart, "J").Value = "" Then
.Item(h) = .Item(h) + 1
iStart = iStart + 1
End If
Next h
Sheets(6).Range("K4").Resize(.count).Insert xlDown
Sheets(6).Range("J4").Resize(.count) = Application.Transpose(.Items)
Is there a way to solve this problem or is there another way of doing what I am trying to do ?