This is my code that sorts my imported data and prints all the numbers with a "519" area code to collumn A on another sheet:
Sub MoveNumbers905()
Dim K As Long
K = 1
Dim s1 As Worksheet, s2 As Worksheet
Set s3 = Sheets("Sheet3")
Set s2 = Sheets("Sheet2")
Dim rG As Range
Set rG = Intersect(s2.Range("G:G"), s2.UsedRange)
Dim r As Range
Dim st As String
st = "(905)"
For Each r In rG
If InStr(r.Value, st) > 0 Then
s3.Cells(K, 11).Value = r.Value
K = K + 1
End If
Next
End Sub
So after using this code, I have collumn A filled up with all the 519 numbers from my imported data. Now i want to count the number of cells that are occupied and display that number in cell G330 by pushing a button
Bookmarks