Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-27-2019, 06:54 AM
Learner7 Learner7 is offline How to paste the value of a selected cell to another sheet? Windows XP How to paste the value of a selected cell to another sheet? Office 2007
Advanced Beginner
How to paste the value of a selected cell to another sheet?
 
Join Date: May 2010
Posts: 51
Learner7 is on a distinguished road
Default How to paste the value of a selected cell to another sheet?

Hi,

I want to copy data of any selected cell automatically and paste it in on another worksheet of the selected cell. How can I do that using VBA code?
Reply With Quote
  #2  
Old 06-27-2019, 07:14 AM
NoSparks NoSparks is offline How to paste the value of a selected cell to another sheet? Windows 7 64bit How to paste the value of a selected cell to another sheet? Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 831
NoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really nice
Default

Can you be a little more specific ?

Any time you click into, tab into or hit the enter key, the cell you go into becomes the selected cell, there are over 17 billion cells on each worksheet. How would VBA know which one(s) you want this copy to happen with, and how would VBA know what cell on which other sheet you want to paste to ?
Reply With Quote
  #3  
Old 06-27-2019, 10:13 AM
NoSparks NoSparks is offline How to paste the value of a selected cell to another sheet? Windows 7 64bit How to paste the value of a selected cell to another sheet? Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 831
NoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really nice
Default

Perhaps look into the Worksheet_SelectionChange and Worksheet_Change events.
Reply With Quote
  #4  
Old 06-30-2019, 10:35 PM
Learner7 Learner7 is offline How to paste the value of a selected cell to another sheet? Windows XP How to paste the value of a selected cell to another sheet? Office 2007
Advanced Beginner
How to paste the value of a selected cell to another sheet?
 
Join Date: May 2010
Posts: 51
Learner7 is on a distinguished road
Default

Quote:
Originally Posted by NoSparks View Post
Can you be a little more specific ?

Any time you click into, tab into or hit the enter key, the cell you go into becomes the selected cell, there are over 17 billion cells on each worksheet. How would VBA know which one(s) you want this copy to happen with, and how would VBA know what cell on which other sheet you want to paste to ?
Thanks. How can I modify the below code to make sure that it only copies the CELL that I selected on Sheet1 but not the range of cells as in the code?

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Not Intersect(Target, Range("A1:A9")) Is Nothing Then
        Target.Copy
    End If
End Sub
I want the selected cell to be copied to the Clip Board. Please do help.

Note: It is working fine. My problem is resolved.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to paste the value of a selected cell to another sheet? How to copy excel sheet withe HEADER and Paste into new sheet? cloudforgiven Excel Programming 6 01-05-2017 07:30 PM
How to paste the value of a selected cell to another sheet? Open an existing sheet by clicking on a cell in a master sheet darbybrown Excel 3 09-12-2016 05:12 PM
Trying to find a macro that will copy a cell and paste that value to a specific sheet bryans88 Excel Programming 1 12-23-2015 01:40 PM
Move data from one sheet to the next available row or cell of another sheet bwwalker08 Excel 0 04-10-2015 11:51 AM
How to paste the value of a selected cell to another sheet? Help Coloring a cell in Sheet one if data is missing from another sheet Aeducan Excel 1 06-22-2014 04:49 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:34 PM.


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