View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett[_2_] Don Guillett[_2_] is offline
external usenet poster
 
Posts: 1,522
Default add multiple letters to the end of multiple cells

On Tuesday, October 9, 2012 11:35:13 AM UTC-5, jetxten wrote:
i am wondering if it is possible to add letters from A to F, to multiple

cells in a column. what i have is six cells in a column with the text

"sc-2346" starting in cell A1 and going down to A6, then the next six

cells (A7-A12) contain the text "sc-2349". what i want to do is add the

letters A-F to those 6 cells so that A1 ends up reading "sc-2346A", A2

reads "sc-2346B".....A6 reads "sc-2346F". then i want to be able to

repeat this process with the next six cells. please let me know if you

know how to do this, if its even possible or any knowledge you might

have. thanks!!









--

jetxten


A simple macro
Option Explicit
Sub trailingletters()
Dim i As Long
For i = 2 To Cells(Rows.Count, 1).End(xlUp).Row Step 6
Cells(i + 0, 1).Offset(0).Value = Cells(i + 0, 1) & "A"
Cells(i + 1, 1).Offset(0).Value = Cells(i + 1, 1) & "B"
Cells(i + 2, 1).Offset(0).Value = Cells(i + 2, 1) & "C"
Cells(i + 3, 1).Offset(0).Value = Cells(i + 3, 1) & "D"
Cells(i + 4, 1).Offset(0).Value = Cells(i + 4, 1) & "E"
Cells(i + 5, 1).Offset(0).Value = Cells(i + 5, 1) & "F"
Next i
End Sub