Breaking a word by each alphabet and inputing it in different cells

  • Thread starter Thread starter Sandip Shah
  • Start date Start date
S

Sandip Shah

Hi,

We have a form in Excel (something like a bank form) where the
details have to be filled in by each character in each cell.

for eg. the word PEPSI would be required to be typed by each alphabet
in the 5 adjoining cells.

Can someone help me out with a macro such that I type the word(could
be 5 to 20 characters long) in the first cell and run the macro. It
should automatically separate the characters in the adjoining cells.

Another way would be to place the cursor (active cell) on the first
cell and run the macro which would display an input box. On entering
the words in the input box and pressing enter, all the characters
would be displayed in separate cells starting from the first cell.

Thanks
Sandip.
 
Sandip

This should get you started.

Tony
Sub aaa()
GetWord = InputBox("get word")
Range("a5").Select
For i = 1 To Len(GetWord)
ActiveCell.Offset(0, i - 1).Value = Mid(GetWord, i, 1)
Next i
End Sub
 
Back
Top