a) It shows whatever you put after it (normally the result of a variable,a text string, result of a formula (see your adapted code below)).
b) yes
c) Can't think of a use for it but the easiest way would probably be to put in a counter to count the iterations. See x in your adapted code below.
Private Sub nameincells_Click()
Dim NIC1 As String
Dim NIC2 As String
Dim NIC3 As String
Dim NIC4 As String
Dim NIC5 As String
Dim NIC6 As String
Dim i As Long, x As Long
'NIC1 = InputBox("ENTER A STRING")
NIC1 = "ARTHUR DAVID SIMON"
MsgBox NIC1
NIC2 = Len(NIC1)
MsgBox "Length of the string is:-" & NIC2
x = 0
For i = 1 To NIC2
Sheets("Sheet5").Activate
ActiveSheet.Cells(i, 5).Value = Left(NIC1, NIC2 - (NIC2 - i)) ' To fill one letter each from left and build in the next rows
ActiveSheet.Cells(i, 7).Value = Right(NIC1, NIC2 - (NIC2 - i)) ' To fill one letter each from right and build in the next rows
ActiveSheet.Cells(i, 6).Value = Mid(NIC1, 1, NIC2 - (NIC2 - i))
x = x + 1
If x > 14 Then Debug.Print i
Next i
Debug.Print WorksheetFunction.Sum(1, 3, 4, 5)
End Sub
Bookmarks