Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is something like this whatt you are looking for?
Sub cutandpaste() OldCell = InputBox("Enter Cell to copy") NewCell = InputBox("Enter Cell to Paste") Range(NewCell).Value = Range(NewCell).Value & Range(OldCell).Value End Sub "Steve G" 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Aug 23, 12:35 pm, Steve G <emailfromandtome-
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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ferris--
Does it work like this: I put the macro in my personal.xls. I open the file with the text. Do I highlight/select the cells I want to transfer the text from? Then I run the macro. The macro asks me for input. I type in C5 or D7 or whatever cell I want the text to go into. I hit "enter." Thank you for your assistance. Steve G |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Aug 23, 5:58 pm, Steve G
wrote: Ferris-- Does it work like this: I put the macro in my personal.xls. I open the file with the text. Do I highlight/select the cells I want to transfer the text from? Then I run the macro. The macro asks me for input. I type in C5 or D7 or whatever cell I want the text to go into. I hit "enter." Thank you for your assistance. Steve G Yeah, it should work pretty much like that. If you have Excel 2003 or earlier I'd throw a button on the toolbar to make it accessible. You don't have to type in the cell reference, you should be able to click anywhere on the sheet and the cell reference should appear in the input box. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
make continuous list of days of week without Sunday | Excel Discussion (Misc queries) | |||
how do i make a continuous data table | Excel Discussion (Misc queries) | |||
Appropriate Object To Hold Memo-Sized Text? | Excel Programming | |||
Add to a string to make it continuous | Excel Programming | |||
Narrative in cells | Excel Discussion (Misc queries) |