ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Putting NAMEs or REFERENCES into Custom Number Formats (https://www.excelbanter.com/excel-discussion-misc-queries/72430-putting-names-references-into-custom-number-formats.html)

kkf718

Putting NAMEs or REFERENCES into Custom Number Formats
 
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.

Peo Sjoblom

Putting NAMEs or REFERENCES into Custom Number Formats
 
Are you talking about format numbers in formatcellnumbers or are you
talking about something like

="This is worth "&TEXT(A1,"$#,##0.00")

I assume the latter


=A2&" "&TEXT(A1,"$#,##0.00")


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




"kkf718" wrote in message
...
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.



kkf718

Putting NAMEs or REFERENCES into Custom Number Formats
 
Unfortunately, it was the former (formatcellnumbers). I am talking about
replacing the text portion of a number format that is typically placed in
quotes "Floor", with a reference to a cell or NAME where the word "Floor" is
typed in once, remotely, and can show up in front of a large group of numbers.

Thanks for the reply though.

"Peo Sjoblom" wrote:

Are you talking about format numbers in formatcellnumbers or are you
talking about something like

="This is worth "&TEXT(A1,"$#,##0.00")

I assume the latter


=A2&" "&TEXT(A1,"$#,##0.00")


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




"kkf718" wrote in message
...
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.




vezerid

Putting NAMEs or REFERENCES into Custom Number Formats
 
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 = "$C$1" Then
Sheets("Sheet2").Range("D1:D1000").NumberFormat = Chr(34) &
Range("C1").Value & Chr(34) & "0"
End If
End Sub

Does this help?

Kostis Vezerides



All times are GMT +1. The time now is 07:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com