Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Tim Tim is offline
external usenet poster
 
Posts: 408
Default Formatting a calculated value in a cell

I have the following array formula (Excel 2003) in a cell:
=AVERAGE(IF(WEEKDAY(Seven)=WEEKDAY($B283),$B$3:$B$ 262))&" per
"&TEXT($B283,"dddd")
where "Seven" is a named range for all the days in the year 2007 & column B
has the production #s for each day & B283 to B289 has the days of the week.
This gives the answer I am looking for:
76.2307692307692 per Monday
However, how can I format the output to 2, or 3, decimal places?
Format, Cells, Number does not work and I cannot come up with a custom
format either.

Thank you
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Formatting a calculated value in a cell

You say that Format, Cells, Number "does not work".

What do you mean by "does not work"? If you apply it to a cell containing
the formula giving the answer 76.2307692307692 and you request a format with
2 or 3 decimal places, what error message do you get, or if no error
message, what unexpected result?
--
David Biddulph

"Tim" wrote in message
...
I have the following array formula (Excel 2003) in a cell:
=AVERAGE(IF(WEEKDAY(Seven)=WEEKDAY($B283),$B$3:$B$ 262))&" per
"&TEXT($B283,"dddd")
where "Seven" is a named range for all the days in the year 2007 & column
B
has the production #s for each day & B283 to B289 has the days of the
week.
This gives the answer I am looking for:
76.2307692307692 per Monday
However, how can I format the output to 2, or 3, decimal places?
Format, Cells, Number does not work and I cannot come up with a custom
format either.

Thank you



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 303
Default Formatting a calculated value in a cell

add round(...................................,2)
to your formula
you'll get

=ROUND(AVERAGE(IF(WEEKDAY(Seven)=WEEKDAY($B283),$B $3:$B$262)),2)
&" per "&TEXT($B283,"dddd")

--
Greetings from New Zealand

"Tim" wrote in message
...
I have the following array formula (Excel 2003) in a cell:
=AVERAGE(IF(WEEKDAY(Seven)=WEEKDAY($B283),$B$3:$B$ 262))&" per
"&TEXT($B283,"dddd")
where "Seven" is a named range for all the days in the year 2007 & column
B
has the production #s for each day & B283 to B289 has the days of the
week.
This gives the answer I am looking for:
76.2307692307692 per Monday
However, how can I format the output to 2, or 3, decimal places?
Format, Cells, Number does not work and I cannot come up with a custom
format either.

Thank you



  #4   Report Post  
Junior Member
 
Posts: 5
Default

Quote:
Originally Posted by Tim View Post
I have the following array formula (Excel 2003) in a cell:
=AVERAGE(IF(WEEKDAY(Seven)=WEEKDAY($B283),$B$3:$B$ 262))&" per
"&TEXT($B283,"dddd")
where "Seven" is a named range for all the days in the year 2007 & column B
has the production #s for each day & B283 to B289 has the days of the week.
This gives the answer I am looking for:
76.2307692307692 per Monday
However, how can I format the output to 2, or 3, decimal places?
Format, Cells, Number does not work and I cannot come up with a custom
format either.

Thank you
Try:

=TEXT(AVERAGE(IF(WEEKDAY(Seven)=WEEKDAY($B283),$B$ 3:$B$262)),"0.00")&" per"&TEXT($B283,"dddd")

confirmed with CSE key combo
  #5   Report Post  
Posted to microsoft.public.excel.misc
Tim Tim is offline
external usenet poster
 
Posts: 408
Default Formatting a calculated value in a cell

Should have clarified: "does not work" means that Excel does not give any
errors. It accepts the formatting change to "Number", 2 decimal places, but
the display does not change.

"David Biddulph" wrote:

You say that Format, Cells, Number "does not work".

What do you mean by "does not work"? If you apply it to a cell containing
the formula giving the answer 76.2307692307692 and you request a format with
2 or 3 decimal places, what error message do you get, or if no error
message, what unexpected result?
--
David Biddulph

"Tim" wrote in message
...
I have the following array formula (Excel 2003) in a cell:
=AVERAGE(IF(WEEKDAY(Seven)=WEEKDAY($B283),$B$3:$B$ 262))&" per
"&TEXT($B283,"dddd")
where "Seven" is a named range for all the days in the year 2007 & column
B
has the production #s for each day & B283 to B289 has the days of the
week.
This gives the answer I am looking for:
76.2307692307692 per Monday
However, how can I format the output to 2, or 3, decimal places?
Format, Cells, Number does not work and I cannot come up with a custom
format either.

Thank you






  #6   Report Post  
Posted to microsoft.public.excel.misc
Tim Tim is offline
external usenet poster
 
Posts: 408
Default Formatting a calculated value in a cell

Thank you.
It worked.

"Bill Kuunders" wrote:

add round(...................................,2)
to your formula
you'll get

=ROUND(AVERAGE(IF(WEEKDAY(Seven)=WEEKDAY($B283),$B $3:$B$262)),2)
&" per "&TEXT($B283,"dddd")

--
Greetings from New Zealand

"Tim" wrote in message
...
I have the following array formula (Excel 2003) in a cell:
=AVERAGE(IF(WEEKDAY(Seven)=WEEKDAY($B283),$B$3:$B$ 262))&" per
"&TEXT($B283,"dddd")
where "Seven" is a named range for all the days in the year 2007 & column
B
has the production #s for each day & B283 to B289 has the days of the
week.
This gives the answer I am looking for:
76.2307692307692 per Monday
However, how can I format the output to 2, or 3, decimal places?
Format, Cells, Number does not work and I cannot come up with a custom
format either.

Thank you




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
Conditional Formatting on calculated text gin Excel Worksheet Functions 3 June 13th 07 06:23 PM
Formatting numbers in each cell after I have calculated their valu Davidr004 Excel Worksheet Functions 1 April 10th 07 06:46 PM
Calculated Field and Calculated Item in Pivot Table Fred Smith Excel Discussion (Misc queries) 0 March 4th 07 08:15 PM
pivot table formulas for calculated field or calculated item Vicky Excel Discussion (Misc queries) 3 June 6th 06 05:06 AM
how to change a calculated cell to = the calculated value CAM Excel Discussion (Misc queries) 4 January 26th 06 05:26 PM


All times are GMT +1. The time now is 10:55 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"