PC Review


Reply
Thread Tools Rate Thread

Custom number format via formula

 
 
cube.head
Guest
Posts: n/a
 
      4th Mar 2009
I'm using that arcane trick where you set the format of a cell to a text
value - for instance if the cell is a 2, I set use "Format Cells..." and set
the cell format to "Custom" and the format code to "Initial Planning
complete". I do this to be able to display the value "Initial Planning
complete" as a data label.

This works well, but it's a manual task. I'm looking for a way to apply the
custom format code for each cell, using a formula somehow. The format code
would come from another cell, ideally.

I'd like to avoid using VBA to do this, although that'd be easiest... Is
there any way to do this using formulas? Thanks for any ideas.
 
Reply With Quote
 
 
 
 
Shane Devenshire
Guest
Posts: n/a
 
      4th Mar 2009
Hi,

You say you are using this for data label, why not get the XLChartLabeler
(free) add in.

http://www.appspro.com/Utilities/ChartLabeler.htm

That way you won't need to play these games.

Alternatively:

=TEXT(A1,B1)

where A1 contains the value and B1 the custom format as a text entry.
--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"cube.head" wrote:

> I'm using that arcane trick where you set the format of a cell to a text
> value - for instance if the cell is a 2, I set use "Format Cells..." and set
> the cell format to "Custom" and the format code to "Initial Planning
> complete". I do this to be able to display the value "Initial Planning
> complete" as a data label.
>
> This works well, but it's a manual task. I'm looking for a way to apply the
> custom format code for each cell, using a formula somehow. The format code
> would come from another cell, ideally.
>
> I'd like to avoid using VBA to do this, although that'd be easiest... Is
> there any way to do this using formulas? Thanks for any ideas.

 
Reply With Quote
 
Ron Rosenfeld
Guest
Posts: n/a
 
      4th Mar 2009
On Wed, 4 Mar 2009 08:38:01 -0800, cube.head
<(E-Mail Removed)> wrote:

>I'm using that arcane trick where you set the format of a cell to a text
>value - for instance if the cell is a 2, I set use "Format Cells..." and set
>the cell format to "Custom" and the format code to "Initial Planning
>complete". I do this to be able to display the value "Initial Planning
>complete" as a data label.
>
>This works well, but it's a manual task. I'm looking for a way to apply the
>custom format code for each cell, using a formula somehow. The format code
>would come from another cell, ideally.
>
>I'd like to avoid using VBA to do this, although that'd be easiest... Is
>there any way to do this using formulas? Thanks for any ideas.


You cannot change the format of a cell using a function.

However, with the result in one cell, you can display in another cell that
result with your custom function by using the TEXT worksheet function.

e.g. = text(a1,"#,##0.00")

and the format string can be located in some cell.
--ron
 
Reply With Quote
 
cube.head
Guest
Posts: n/a
 
      4th Mar 2009
Thanks Shane. I don't think that I can use XLChartLabeler, as this chart is
destined to become available via Excel Services. I'm not sure what the story
is with Excel Services and VBA code, but I think I've heard that it's not
good :-(

I tried the TEXT function, but all I get is a scrambled-looking version of
my string:
=TEXT(A1,"This is a test") gives "T0i0 i0 a t19000t"

"Shane Devenshire" wrote:

> Hi,
>
> You say you are using this for data label, why not get the XLChartLabeler
> (free) add in.
>
> http://www.appspro.com/Utilities/ChartLabeler.htm
>
> That way you won't need to play these games.
>
> Alternatively:
>
> =TEXT(A1,B1)
>
> where A1 contains the value and B1 the custom format as a text entry.
> --
> If this helps, please click the Yes button.
>
> Cheers,
> Shane Devenshire
>
>
> "cube.head" wrote:
>
> > I'm using that arcane trick where you set the format of a cell to a text
> > value - for instance if the cell is a 2, I set use "Format Cells..." and set
> > the cell format to "Custom" and the format code to "Initial Planning
> > complete". I do this to be able to display the value "Initial Planning
> > complete" as a data label.
> >
> > This works well, but it's a manual task. I'm looking for a way to apply the
> > custom format code for each cell, using a formula somehow. The format code
> > would come from another cell, ideally.
> >
> > I'd like to avoid using VBA to do this, although that'd be easiest... Is
> > there any way to do this using formulas? Thanks for any ideas.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
convert number to % using only custom number format challenge Brotherharry Microsoft Excel Misc 7 2nd Jun 2009 06:29 PM
Custom number format for driver's license number excel user Microsoft Excel Misc 10 16th Jul 2008 10:05 PM
Custom Number Format with Text as formula =?Utf-8?B?bXplaHI=?= Microsoft Excel Misc 5 14th May 2007 09:56 PM
how do I add phone number format as a permanent custom format? frustratedagain Microsoft Excel Misc 3 4th Feb 2006 03:52 AM
Custom number format always defaults last number to 0. =?Utf-8?B?c2N1YmFkYXZl?= Microsoft Excel Misc 2 15th Jun 2005 10:20 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:32 AM.