View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Simple (?) Macro

Try the following code:

Sub AAA()
Dim LastRow As Long
Dim FirstRow As Long
Dim RowNdx As Long
Dim WS As Worksheet
Dim S As String
Set WS = Worksheets("Sheet1") '<<< CHANGE AS REQUIRED
FirstRow = 1 '<<< CHANGE AS REQUIRED
On Error GoTo ErrH
Application.EnableEvents = False
With WS
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For RowNdx = FirstRow To LastRow
S = .Cells(RowNdx, "C")
S = Mid(.Cells(RowNdx, "B"), 2, 1) & _
Left(.Cells(RowNdx, "B"), 1) & S
.Cells(RowNdx, "C").Value = S
Next RowNdx
End With
ErrH:
Application.EnableEvents = True
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)


"NeedHelp" wrote in message
...
I have three columns of data similar to:
A B C
a 1a melon
b 2b lettuce

I want column c to read a1amelon
that much is easy but I want this to apply to every row to the end of the
data
so that it reads like:

a 1a a1amelon
b 2b b2blettuce
etc.

Help is appreciated

--
Thanks