I know how to format numbers so that text appears in front of the number, but
I want that text to come from another location, like a NAME or another cell.
It would be impractical to type the text into each cell or to copy formats
around every time you want to change the text in front of the number.
Knowing how to do this for both NAMEs and References would be nice, but I
will take either at this point.
Are you talking about format numbers in formatgt;cellgt;numbers or are you
talking about something like
=quot;This is worth quot;amp;TEXT(A1,quot;$#,##0.00quot;)
I assume the latter=A2amp;quot; quot;amp;TEXT(A1,quot;$#,##0.00quot;)text in A2 and number in A1
You cannot use formatting with cell links if it was the former
--
Regards,
Peo Sjoblom
Northwest Excel Solutions
Portland, Oregon
quot;kkf718quot; gt; wrote in message
...
gt;I know how to format numbers so that text appears in front of the number,
gt;but
gt; I want that text to come from another location, like a NAME or another
gt; cell.
gt; It would be impractical to type the text into each cell or to copy formats
gt; around every time you want to change the text in front of the number.
gt; Knowing how to do this for both NAMEs and References would be nice, but I
gt; will take either at this point.Unfortunately, it was the former (formatgt;cellgt;numbers). I am talking about
replacing the text portion of a number format that is typically placed in
quotes quot;Floorquot;, with a reference to a cell or NAME where the word quot;Floorquot; is
typed in once, remotely, and can show up in front of a large group of numbers.
Thanks for the reply though.
quot;Peo Sjoblomquot; wrote:
gt; Are you talking about format numbers in formatgt;cellgt;numbers or are you
gt; talking about something like
gt;
gt; =quot;This is worth quot;amp;TEXT(A1,quot;$#,##0.00quot;)
gt;
gt; I assume the latter
gt;
gt;
gt; =A2amp;quot; quot;amp;TEXT(A1,quot;$#,##0.00quot;)
gt;
gt;
gt; text in A2 and number in A1
gt;
gt; You cannot use formatting with cell links if it was the former
gt; --
gt; Regards,
gt;
gt; Peo Sjoblom
gt;
gt; Northwest Excel Solutions
gt;
gt; Portland, Oregon
gt;
gt;
gt;
gt;
gt; quot;kkf718quot; gt; wrote in message
gt; ...
gt; gt;I know how to format numbers so that text appears in front of the number,
gt; gt;but
gt; gt; I want that text to come from another location, like a NAME or another
gt; gt; cell.
gt; gt; It would be impractical to type the text into each cell or to copy formats
gt; gt; around every time you want to change the text in front of the number.
gt; gt; Knowing how to do this for both NAMEs and References would be nice, but I
gt; gt; will take either at this point.
gt;
gt;
Then a worksheet_change macro can work for you. Let us say the cell is
C1.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = quot;$C$1quot; Then
Sheets(quot;Sheet2quot;).Range(quot;D11000quot;).NumberFormat = Chr(34) amp;
Range(quot;C1quot;).Value amp; Chr(34) amp; quot;0quot;
End If
End Sub
Does this help?
Kostis Vezerides
- Feb 22 Thu 2007 20:35
Putting NAMEs or REFERENCES into Custom Number Formats
close
全站熱搜
留言列表
發表留言