+ Reply to Thread
Results 1 to 8 of 8

Copy/Paste from once cell to another

  1. #1
    Registered User
    Join Date
    01-11-2006
    Posts
    30

    Copy/Paste from once cell to another

    Is there a way to create a macro or formula that will copy just the first word of a cell and past it into a new cell? To take that further, copy the first word out of each cell in a column and past those into cells within a new column?

  2. #2
    Don Guillett
    Guest

    Re: Copy/Paste from once cell to another

    formula to copy down
    =LEFT(F11,FIND(" ",F11)-1)

    --
    Don Guillett
    SalesAid Software
    [email protected]
    "ebraun01" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Is there a way to create a macro or formula that will copy just the
    > first word of a cell and past it into a new cell? To take that
    > further, copy the first word out of each cell in a column and past
    > those into cells within a new column?
    >
    >
    > --
    > ebraun01
    > ------------------------------------------------------------------------
    > ebraun01's Profile:
    > http://www.excelforum.com/member.php...o&userid=30340
    > View this thread: http://www.excelforum.com/showthread...hreadid=504474
    >




  3. #3
    Registered User
    Join Date
    01-11-2006
    Posts
    30
    Perfect, works great. Now is there a way to tell it when to run at a time of my choosing. In other words I would prefer to not just have the formula within the cells but to hit a button or run a macro and have the formula ran.

  4. #4
    Don Guillett
    Guest

    Re: Copy/Paste from once cell to another

    Sub getfirstword()
    lr=cells(rows.count,"f").end(xlup).row
    For Each c In Range("f9:f" & lr)
    offset(, 1) = Left(c, InStr(c, " ") - 1)
    Next
    End Sub

    --
    Don Guillett
    SalesAid Software
    [email protected]
    "ebraun01" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Perfect, works great. Now is there a way to tell it when to run at a
    > time of my choosing. In other words I would prefer to not just have the
    > formula within the cells but to hit a button or run a macro and have the
    > formula ran.
    >
    >
    > --
    > ebraun01
    > ------------------------------------------------------------------------
    > ebraun01's Profile:
    > http://www.excelforum.com/member.php...o&userid=30340
    > View this thread: http://www.excelforum.com/showthread...hreadid=504474
    >




  5. #5
    Registered User
    Join Date
    01-11-2006
    Posts
    30
    Thanks Don, I really appreciate your great help.

    That looks like to much information for a cell formula..where does that go?

  6. #6
    Don Guillett
    Guest

    Re: Copy/Paste from once cell to another

    You did ask for a macro, didn't you? use alt f11 to put into a module and
    then assign to a button or run from alt f8

    --
    Don Guillett
    SalesAid Software
    [email protected]
    "ebraun01" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks Don, I really appreciate your great help.
    >
    > That looks like to much information for a cell formula..where does that
    > go?
    >
    >
    > --
    > ebraun01
    > ------------------------------------------------------------------------
    > ebraun01's Profile:
    > http://www.excelforum.com/member.php...o&userid=30340
    > View this thread: http://www.excelforum.com/showthread...hreadid=504474
    >




  7. #7
    Registered User
    Join Date
    01-11-2006
    Posts
    30
    Your right, I did ask for a macro.. must have taken my stupid pill that day.

    I created a macro and ran it and received a compile error. "sub or function not defined" with "Offset(, 1) =" highlighted in blue. Do I need to put something after the = but before the word "left"?

  8. #8
    Don Guillett
    Guest

    Re: Copy/Paste from once cell to another

    should be
    c.offset

    Sub getfirstword()
    lr=cells(rows.count,"f").end(xlup).row
    For Each c In Range("f9:f" & lr)
    c.offset(, 1) = Left(c, InStr(c, " ") - 1)
    Next
    End Sub

    --
    Don Guillett
    SalesAid Software
    [email protected]
    "ebraun01" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Your right, I did ask for a macro.. must have taken my stupid pill that
    > day.
    >
    > I created a macro and ran it and received a compile error. "sub or
    > function not defined" with "-Offset(, 1) =" -highlighted in blue. Do I
    > need to put something after the = but before the word "left"?
    >
    >
    > --
    > ebraun01
    > ------------------------------------------------------------------------
    > ebraun01's Profile:
    > http://www.excelforum.com/member.php...o&userid=30340
    > View this thread: http://www.excelforum.com/showthread...hreadid=504474
    >




+ 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