Dim count As Integer
Dim myData As Workbook
Dim col As Integer, rng As Range, n#, b#
col = Selection.Column 'choose the column to count the values from
If Application.WorksheetFunction.CountA(Columns(col)) = 0 Then
MsgBox "You have selected a blank column"
n = 0
Else
Set rng = Intersect(Columns(col), ActiveSheet.UsedRange)
On Error Resume Next
b = rng.Cells.SpecialCells(xlCellTypeBlanks).count
n = rng.Cells.count - b - 1
On Error GoTo 0
Worksheets("sheet1").Select
Dim count As Integer
Dim myData As Workbook
Dim