Question: my task is:

1) Select all cells in A row which contain values (done).
2) Text to Columns - example value 2017.01.01

```
Sub selectAndToColumns()
    Dim LR As Long
    LR = Range("A" & Rows.Count).End(xlUp).Row
    Range("A1:A" & LR).SpecialCells(xlCellTypeConstants, 23).Select
'2nd step
    Selection.TextToColumns Destination:=Range(A1), DataType:=xlDelimited, _
    TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
    Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
    :=".", FieldInfo:=Array(Array(1, 2), Array(2, 1), Array(3, 1))
End Sub

```

1 step is ok, but how can I use my selection instead of Range(A1) in 2nd step? Can I make a variable and how?

Answer: 
In python, a string is like a "instance of class str". To order to compare if the "content" within the input was a string, you can make something like...

```
a = input("Put something...")

if isinstance(a, str):
    print("Error caught, a string was given...")
else:
    print ("Now your number is", a, "and its type is" , type(a))

```
Why not simply encapsulate your Logic within a `try :: except` Block like so:

```
iNumber = input ("Please, enter a Number: \n")
try :
    # TRY CASTING THE ENTERED DATA TO A FLOAT...
    iNumber = float(iNumber)
    print ("Now your number is {} and its type is {}".format(iNumber, type(iNumber)))
except:
    # IF CASTING FAILS, THEN YOU KNOW IT'S A STRING OR SO... 
    # DO SOMETHING - THROW AN EXCEPTION OR WHATEVER...
    print ("Non Numeric Data is not acceptable...")

```

**UPDATE:**  

If you wish to handle Complex Number Inputs (like you mentioned in your comment)... you could just wrap the Code above in an `if - else` block like so:

```
import re

iNumber         = input ("Please, enter a Number: \n")
# MATCH A SOMEWHAT COMPLEX NUMBER PATTERN
if re.match(r"\d{1,}[ \-\+]*\d{1,}[a-z]", iNumber):
    print("Not possible to convert a complex number to float: {}".format(iNumber))
else:
    try :
        # TRY CASTING THE ENTERED DATA TO A FLOAT...
        iNumber = float(iNumber)
        print ("Now your number is {} and its type is {}".format(iNumber, type(iNumber)))
    except:
        # IF CASTING FAILS, THEN YOU KNOW IT'S A STRING OR SO...
        # DO SOMETHING - THROW AN EXCEPTION OR WHATEVER...
        print ("Non Numeric Data is not acceptable...")

```