+ Reply to Thread
Results 1 to 7 of 7

Pasting help

  1. #1
    Registered User
    Join Date
    10-16-2005
    Posts
    11

    Pasting help

    Hello

    I have a problem with pasting values in a single cell only.

    Say I have :

    Metro
    Home
    Centre
    451-3434

    as a copied value, and I'd like to directly have this pasted in a single cell including its line spacing.

    The macro recording function uses
    ActiveSheet.Paste
    but it paste values to many cells in a column.

    manipulating ActiveCell.FormulaR1C1 ="pasted values here"

    seems to be the answer.

    What's the script to be able to click on one cell and just activate a macro that would put in pasted values in a single cell? Thanks

  2. #2
    Don Guillett
    Guest

    Re: Pasting help

    how about

    range("destinationcell").value=range("sourcell")
    or
    range("destinationrange").value=range("sourrange").value
    or

    --
    Don Guillett
    SalesAid Software
    [email protected]
    "Ambrosia" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hello
    >
    > I have a problem with pasting values in a single cell only.
    >
    > Say I have :
    >
    > Metro
    > Home
    > Centre
    > 451-3434
    >
    > as a copied value, and I'd like to directly have this pasted in a
    > single cell including its line spacing.
    >
    > The macro recording function uses
    > ActiveSheet.Paste
    > but it paste values to many cells in a column.
    >
    > manipulating ActiveCell.FormulaR1C1 ="pasted values here"
    >
    > seems to be the answer.
    >
    > What's the script to be able to click on one cell and just activate a
    > macro that would put in pasted values in a single cell? Thanks
    >
    >
    > --
    > Ambrosia
    > ------------------------------------------------------------------------
    > Ambrosia's Profile:
    > http://www.excelforum.com/member.php...o&userid=28146
    > View this thread: http://www.excelforum.com/showthread...hreadid=486692
    >




  3. #3
    Registered User
    Join Date
    10-16-2005
    Posts
    11
    Um.... I'm afraid I dont know how to use your answer to my question. Can you explain to me?

  4. #4
    Don Guillett
    Guest

    Re: Pasting help

    try it by replacing with your ranges

    --
    Don Guillett
    SalesAid Software
    [email protected]
    "Ambrosia" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Um.... I'm afraid I dont know how to use your answer to my question. Can
    > you explain to me?
    >
    >
    > --
    > Ambrosia
    > ------------------------------------------------------------------------
    > Ambrosia's Profile:
    > http://www.excelforum.com/member.php...o&userid=28146
    > View this thread: http://www.excelforum.com/showthread...hreadid=486692
    >




  5. #5
    Tim Williams
    Guest

    Re: Pasting help

    Are you copying the pasted value from another cell in Excel, or is it
    coming from another application?

    Tim

    "Ambrosia" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Um.... I'm afraid I dont know how to use your answer to my question.
    > Can
    > you explain to me?
    >
    >
    > --
    > Ambrosia
    > ------------------------------------------------------------------------
    > Ambrosia's Profile:
    > http://www.excelforum.com/member.php...o&userid=28146
    > View this thread:
    > http://www.excelforum.com/showthread...hreadid=486692
    >




  6. #6
    Registered User
    Join Date
    10-16-2005
    Posts
    11
    Say it came from another application....

    Thanks a lot for the help, but can you tell me how the script should be as a macro?

    Say I have a copied values already and all i need to do is activate that macro to paste the values in one cell. Thanks..!

  7. #7
    Rowan Drummond
    Guest

    Re: Pasting help

    You could try something like:

    Dim clipb As New DataObject
    clipb.GetFromClipboard
    ActiveCell.Value = clipb.GetText

    You will need to set a reference to the Microsoft Forms 2.0 Object
    library to be able to use this. In the VBE select Tools>References and
    check the box next to Microsoft Forms 2.0 Object Library.

    Hope this helps
    Rowan

    Ambrosia wrote:
    > Say it came from another application....
    >
    > Thanks a lot for the help, but can you tell me how the script should be
    > as a macro?
    >
    > Say I have a copied values already and all i need to do is activate
    > that macro to paste the values in one cell. Thanks..!
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1