Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I would like very much to be able to place the cursor immediately below a
line that contains data in cols a,b,c,d,e, Then click on a macro and that macro would concatonate all the data in the line above into the selected cell. Can this be done Thanks |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This does it by selecting a cell
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) On Error GoTo EndMacro Application.EnableEvents = False With Target If .Row 1 Then .Value = Cells(.Row - 1, "A").Value & Cells(.Row - 1, "B").Value & _ Cells(.Row - 1, "C").Value & Cells(.Row - 1, "D").Value & _ Cells(.Row - 1, "E").Value End If End With EndMacro: Application.EnableEvents = True End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- HTH Bob Phillips (remove nothere from email address if mailing direct) "pcor" wrote in message ... I would like very much to be able to place the cursor immediately below a line that contains data in cols a,b,c,d,e, Then click on a macro and that macro would concatonate all the data in the line above into the selected cell. Can this be done Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
concatonate | Excel Discussion (Misc queries) |