View Single Post
 
Old 10-26-2015, 11:37 AM
laterdater laterdater is offline Windows 7 64bit Office 2013
Novice
 
Join Date: Oct 2015
Posts: 2
laterdater is on a distinguished road
Default

I am still confused as to why my For Each didn't work, but I solved this by getting rid of my "For Each" and replacing it with the following:

Code:
    Set rn = sh.UsedRange
    k = rn.Rows.Count + rn.Row - 1
    For y = 2 To k
                If sh.Range("A" & y) Like "*2" Then
                            shdest.Range("D7") = sh.Range("A" & y)
                            Else: shdest.Range("D8") = sh.Range("A" & y)

                End If
    Next y
Reply With Quote