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: 
```
def do_input():
    user_input = input("Input a number: ")
    try:
        num = int(user_input)
    except ValueError:
        try:
            num = float(user_input)
        except ValueError:
            print("You didn't input a number")
            num = None
    return num

for _ in range(3):
    a = do_input()
    print("Now your number is", a, "and its type is" , type(a))

```

Output:

```
Input a number: 3
Now your number is 3 and its type is <class 'int'>
Input a number: 2.1
Now your number is 2.1 and its type is <class 'float'>
Input a number: ij
You didn't input a number
Now your number is None and its type is <class 'NoneType'>

```
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))

```