Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 08-11-2022, 09:07 AM
p45cal's Avatar
p45cal p45cal is offline Problems combining selected cells Windows 10 Problems combining selected cells Office 2019
Expert
 
Join Date: Apr 2014
Posts: 956
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Try this for the macro:
Code:
Sub CopySelectedCells()
For Each cll In Selection.Cells
  Range("C15").Value = Range("C15").Value & " " & cll.Value
Next cll
End Sub
It will only copy text, no formatting such as bold colour etc.
Note also that it will copy the cells in the order you selected them in, even if the cells are next to each other. For example you could hold the Ctrl key down then in sequence click on C10, then C9 then C8, you'll get:
Only formulas and number formatting. The width of one column or range of columns to another column or range of columns. Cell contents and formatting except cell borders.


It's not quite perfect, it adds a space for the first cell copied too.

Last edited by p45cal; 08-12-2022 at 04:06 AM. Reason: spellin
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems combining selected cells combining cells with multiple choices H28Sailor Excel 1 01-13-2017 11:02 PM
Problems combining selected cells Combining several cells data into one single cell H28Sailor Excel 6 01-09-2017 06:00 AM
Combining 2 tables into 1 and use Table2's column widths (hoping for workaround dealing merged cells CodingGuruInTraining Word VBA 24 10-07-2015 07:48 PM
Problems combining selected cells Combining daily S.M.A.R.T data in a meaningfull sheet (2 problems) Vitolio Excel 1 07-10-2013 08:58 AM
Problems combining selected cells Combining Text from Table Cells robmorleyuk Word 1 11-01-2011 07:24 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:30 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft