Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Multiple formats in a cell

Can anyone offer a solution to the issue of allowing a cell to display a
value in two formats?
I have a spreadsheet and in a cell I have a lookup which checks a table
depending on what is selected from a list, the table has two different values
Number and Percentage, these values are pulled into a summary screen to
complete a sentance. I can only get the value to display as either a number
or a percentage. Any suggestions please?

Thanks, Gridlock.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Multiple formats in a cell

Hi,

You could try this. This assumed any value less that 1 as a percentage.
Also, the output will be a text value and not a number.

=IF(D23<1,TEXT(D23,"0.00%"),D23)

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Gridlock" wrote in message
...
Can anyone offer a solution to the issue of allowing a cell to display a
value in two formats?
I have a spreadsheet and in a cell I have a lookup which checks a table
depending on what is selected from a list, the table has two different
values
Number and Percentage, these values are pulled into a summary screen to
complete a sentance. I can only get the value to display as either a
number
or a percentage. Any suggestions please?

Thanks, Gridlock.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Multiple formats in a cell

On Wed, 18 Nov 2009 01:01:01 -0800, Gridlock
wrote:

Can anyone offer a solution to the issue of allowing a cell to display a
value in two formats?
I have a spreadsheet and in a cell I have a lookup which checks a table
depending on what is selected from a list, the table has two different values
Number and Percentage, these values are pulled into a summary screen to
complete a sentance. I can only get the value to display as either a number
or a percentage. Any suggestions please?

Thanks, Gridlock.


It is hard to give specifics without knowing more. You can't just copy the
format using worksheet functions. However, you could use the CELL worksheet
function to determine whether the original cell is formatted as Percentage;
then use the TEXT worksheet function to display this as desired.

For example, assuming that your cells will be displayed as either a Percentage
with 2 decimal places; or a number with 2 decimal places:

=TEXT(A1,IF(CELL("format",A1)="P2","0.00%","0.00") )

Look at HELP for the CELL worksheet function for other options.

Be aware that merely changing the format of a cell does not trigger a
calculation event, so the CELL worksheet function may not update until some
value changes.
--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple formats in a cell Gridlock Excel Worksheet Functions 2 November 17th 09 02:04 PM
Multiple Formats per Cell Timo Excel Worksheet Functions 6 December 6th 08 11:30 PM
Multiple formats in a single cell with multiple formulas Zakhary Excel Worksheet Functions 1 May 2nd 08 12:08 AM
Multiple formats in the same cell [email protected] Excel Worksheet Functions 2 January 16th 07 11:49 PM
Multiple formats within a cell gailann Excel Discussion (Misc queries) 5 June 7th 06 03:42 PM


All times are GMT +1. The time now is 05:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"