Combined cells to a singel cell

C

cwklep

I am trying to copy from 3 combined cells to a single cell. When I copy the
combined cells to a single cell the single cell turns into 3 cells and
overlaps the date in the cells next to them. Is there a way to copy the data
from combined cells into a single cell without over writing the cells next to
them.
 
S

Simon Lloyd

Do you want the data to be static or change as the cells change? if yo
want to "display" the data from the cells then something like =A1 & "
& B1 & " " & C1 if you want to show it static as a concatenation the
you will need the help of VBA, it can be done smarter than this but yo
get the ide
Code
-------------------
Sub concatenation_by_inputbox(
Dim IB1 As String, IB2 As String, IB3 As Strin
IB1 = Application.InputBox("Enter your first cell in this fashion A1", "Cell 1 for concatenation"
IB2 = Application.InputBox("Enter your second cell in this fashion A1", "Cell 2 for concatenation"
IB3 = Application.InputBox("Enter your third cell in this fashion A1", "Cell 3 for concatenation"
ActiveCell.Value = Range(IB1).Value & " " & Range(IB2).Value & " " & Range(IB3).Valu
End Su
-------------------

*How to add and run a Macro*1. *Copy* the macro above pressin
the keys *CTRL+C*
2. Open your workbook
3. Press the keys *ALT+F11* to open the Visual Basic Editor
4. Press the keys *ALT+I* to activate the *Insert menu*
5. *Press M* to insert a *Standard Module*
6. *Paste* the code by pressing the keys *CTRL+V*
7. Make any custom changes to the macro if needed at this time.
8. *Save the Macro* by pressing the keys *CTRL+S*
9. Press the keys *ALT+Q* to exit the Editor, and return to Excel.

*To Run the Macro...*
To run the macro from Excel, open the workbook, and press *ALT+F8* t
display the *Run Macro Dialog*. Double Click the macro's name to *Run
it.
cwklep;443535 said:
I am trying to copy from 3 combined cells to a single cell. When I cop
th
combined cells to a single cell the single cell turns into 3 cells an
overlaps the date in the cells next to them. Is there a way to copy th
dat
from combined cells into a single cell without over writing the cell
next t
them

--
Simon Lloy

Regards
Simon Lloy
'Microsoft Office Help' (http://www.thecodecage.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top