What is the syntax to split a string from the middle?

Mid (String, start, length)
'String - string from which return value is extracted; mandatory parameter
'start - integer of starting position of extraction; mandatory parameter
'length - length of extraction; optional
'examples
Dim sentence As String
sentence = "blackgraywhite"
MsgBox (Mid(sentence, 6, 4)) 'gray
MsgBox (Mid(sentence, 1, 5)) 'black
MsgBox (Mid(sentence, 10)) 'white

 

Advertisements

What is the syntax to select cells?

To select a single cell

Range("<Cell Value>").Select
(ex) Range("A1").Select
(ex) Range("C3").Select

 

To select a continuous range

Range("<Cell Value>").Select
(ex) Range("A1:B4").Select
(ex) Range("C3:F400").Select

 

To select multiple non-continuous ranges

Range("<Cell Value>, <Cell Value>").Select
(ex) Range("A1:E3, H2:H44").Select
(ex) Range("C3:D4, Y3:Y4").Select

 

To select down to the 1st empty cell

Range(Selection, Selection.End(xlDown)).Select

toselectdowntofirstemptycell