![]() |
Combined cells to a singel cell
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. |
Combined cells to a singel cell
Do you want the data to be static or change as the cells change? if you want to "display" the data from the cells then something like =A1 & " " & B1 & " " & C1 if you want to show it static as a concatenation then you will need the help of VBA, it can be done smarter than this but you get the idea Code: -------------------- Sub concatenation_by_inputbox() Dim IB1 As String, IB2 As String, IB3 As String 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).Value End Sub -------------------- *How to add and run a Macro*1. *Copy* the macro above pressing 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* to display the *Run Macro Dialog*. Double Click the macro's name to *Run* it. cwklep;443535 Wrote: 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. -- Simon Lloyd Regards, Simon Lloyd 'Microsoft Office Help' (http://www.thecodecage.com) ------------------------------------------------------------------------ Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=122998 |
All times are GMT +1. The time now is 11:11 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com