On Aug 23, 12:35 pm, Steve G <emailfromandtome-
softwareus...@yahoo.com> wrote:
> Frequently I have text in various cells in Excel. For instance, A1,
> A2, A3 might have text only in these cell. There might be a different
> sentence in each cell. I would like to cut the text from A2 and A3 in
> that order and append it to the text in A1 without doing cuts and
> pastes. The cells would always be contiguous as in my example.
> Better yet, if there was a wizard that let me name the cells from
> which I want to take text out of and the cell that I want to paste
> text into, that would be best.
>
> Thank you.
>
> Steve G
If you select the cells in the order you want them, then this should
work. It will prompt you for the destination cell.
Sub test()
Dim rng As Range, rngPaste As Range
Set rng = Selection
Text = ""
For Each c In rng
Text = Text & c.Value
Next
Set rngPaste = Application.InputBox _
(Prompt:="Please select the destination cell", Type:=8)
If Not rngPaste Is Nothing Then
rngPaste.Value = Text
End If
End Sub
|