close

I have a report with sub-totals in Excel 2003 and I have copied the
sub-totals as a paste special values to a new spread sheet and want to remove
the word total and keep a leading zero that is part of our Part Numbers. is
there an easy way to do that? Here's an example cell
Befo
03010042 Total
After I want this:
03010042
When I do a find and replace it removes the leading 0 even with the column
set as a text column.Hi,

Format the cell after you have replaced the contents:

Format =gt; Cells =gt; Custom, then in the Type bar enter quot;00000000quot; (without
the quotation marks)

Ewan

quot;Lesliequot; wrote:

gt; I have a report with sub-totals in Excel 2003 and I have copied the
gt; sub-totals as a paste special values to a new spread sheet and want to remove
gt; the word total and keep a leading zero that is part of our Part Numbers. is
gt; there an easy way to do that? Here's an example cell
gt; Befo
gt; 03010042 Total
gt; After I want this:
gt; 03010042
gt; When I do a find and replace it removes the leading 0 even with the column
gt; set as a text column.
gt;

format the selected area as TEXT first and then use.
Sub removetextleaveleadingzero()

For Each c In Selection
c.Value = Left(c, Len(c) - 5)
Next

End Sub

--
Don Guillett
SalesAid Software

quot;Lesliequot; gt; wrote in message
...
gt;I have a report with sub-totals in Excel 2003 and I have copied the
gt; sub-totals as a paste special values to a new spread sheet and want to
gt; remove
gt; the word total and keep a leading zero that is part of our Part Numbers.
gt; is
gt; there an easy way to do that? Here's an example cell
gt; Befo
gt; 03010042 Total
gt; After I want this:
gt; 03010042
gt; When I do a find and replace it removes the leading 0 even with the column
gt; set as a text column.
gt;

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

    software

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