Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 08-26-2021, 12:28 AM
Guessed's Avatar
Guessed Guessed is offline Paste value of selected cell to adjacent cell Windows 10 Paste value of selected cell to adjacent cell Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

There is probably a more elegant way but this appears to work
Code:
Sub CopyBeside()
  Dim aCell As Range
  For Each aCell In Selection
    aCell.Copy Destination:=aCell.Offset(0, 1)
  Next aCell
End Sub
And there we have another way courtesy of Purfleet - note there will likely be a difference with how a discontinuous selection works with these two alternative approaches.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia

Last edited by Guessed; 08-26-2021 at 12:31 AM. Reason: Purfleet's solution got there first
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Paste value of selected cell to adjacent cell How to paste the value of a selected cell to another sheet? Learner7 Excel Programming 3 06-30-2019 10:35 PM
Paste value of selected cell to adjacent cell Fill blank cell with value from adjacent cell kevinbradley57 Excel Programming 2 04-17-2018 08:40 AM
IF adjacent cell empty Copy from Other Column ChrisOK Excel Programming 8 03-08-2018 09:17 PM
Increase number in cell, based on value in adjacent cell scottyb Excel 3 02-02-2017 03:51 AM
Paste value of selected cell to adjacent cell How to conditionally format cells in Col. A if it matches adjacent cell in Col. B? alshcover Excel 2 06-03-2014 12:50 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:46 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