close

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: www.excelforum.com/member.php...oamp;userid=30340
View this thread: www.excelforum.com/showthread...hreadid=504474formula to copy down
=LEFT(F11,FIND(quot; quot;,F11)-1)

--
Don Guillett
SalesAid Software

quot;ebraun01quot; gt; wrote in
message ...
gt;
gt; Is there a way to create a macro or formula that will copy just the
gt; first word of a cell and past it into a new cell? To take that
gt; further, copy the first word out of each cell in a column and past
gt; those into cells within a new column?
gt;
gt;
gt; --
gt; ebraun01
gt; ------------------------------------------------------------------------
gt; ebraun01's Profile:
gt; www.excelforum.com/member.php...oamp;userid=30340
gt; View this thread: www.excelforum.com/showthread...hreadid=504474
gt;

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: www.excelforum.com/member.php...oamp;userid=30340
View this thread: www.excelforum.com/showthread...hreadid=504474Sub getfirstword()
lr=cells(rows.count,quot;fquot;).end(xlup).row
For Each c In Range(quot;f9:fquot; amp; lr)
offset(, 1) = Left(c, InStr(c, quot; quot;) - 1)
Next
End Sub

--
Don Guillett
SalesAid Software

quot;ebraun01quot; gt; wrote in
message ...
gt;
gt; Perfect, works great. Now is there a way to tell it when to run at a
gt; time of my choosing. In other words I would prefer to not just have the
gt; formula within the cells but to hit a button or run a macro and have the
gt; formula ran.
gt;
gt;
gt; --
gt; ebraun01
gt; ------------------------------------------------------------------------
gt; ebraun01's Profile:
gt; www.excelforum.com/member.php...oamp;userid=30340
gt; View this thread: www.excelforum.com/showthread...hreadid=504474
gt;

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: www.excelforum.com/member.php...oamp;userid=30340
View this thread: www.excelforum.com/showthread...hreadid=504474You 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

quot;ebraun01quot; gt; wrote in
message ...
gt;
gt; Thanks Don, I really appreciate your great help.
gt;
gt; That looks like to much information for a cell formula..where does that
gt; go?
gt;
gt;
gt; --
gt; ebraun01
gt; ------------------------------------------------------------------------
gt; ebraun01's Profile:
gt; www.excelforum.com/member.php...oamp;userid=30340
gt; View this thread: www.excelforum.com/showthread...hreadid=504474
gt;

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. quot;sub or
function not definedquot; with quot;-Offset(, 1) =quot; -highlighted in blue. Do I
need to put something after the = but before the word quot;leftquot;?--
ebraun01
------------------------------------------------------------------------
ebraun01's Profile: www.excelforum.com/member.php...oamp;userid=30340
View this thread: www.excelforum.com/showthread...hreadid=504474should be
c.offset

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

--
Don Guillett
SalesAid Software

quot;ebraun01quot; gt; wrote in
message ...
gt;
gt; Your right, I did ask for a macro.. must have taken my stupid pill that
gt; day.
gt;
gt; I created a macro and ran it and received a compile error. quot;sub or
gt; function not definedquot; with quot;-Offset(, 1) =quot; -highlighted in blue. Do I
gt; need to put something after the = but before the word quot;leftquot;?
gt;
gt;
gt; --
gt; ebraun01
gt; ------------------------------------------------------------------------
gt; ebraun01's Profile:
gt; www.excelforum.com/member.php...oamp;userid=30340
gt; View this thread: www.excelforum.com/showthread...hreadid=504474
gt;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()