A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Cell format for an array formula containing text



 
 
Thread Tools Display Modes
  #1  
Old April 15th, 2009, 08:00 PM posted to microsoft.public.excel.worksheet.functions
Pete
external usenet poster
 
Posts: 384
Default Cell format for an array formula containing text

I have the following array formula:

{=IF(G16=0,0&"
days",AVERAGE(IF((DrugList!F3:F72=FY!G3)*(DrugLis t!F3:F72=FY!G4),DrugList!W3:W72))&" days")}

it returns the following value in the cell: 114.333333333333 days.

How can I get tha formula to return 114 days (no decimals)?

Pete.



  #2  
Old April 15th, 2009, 08:41 PM posted to microsoft.public.excel.worksheet.functions
Luke M
external usenet poster
 
Posts: 2,672
Default Cell format for an array formula containing text

Use the INT function.

{=IF(G16=0,0&"
days",INT(AVERAGE(IF((DrugList!F3:F72=FY!G3)*(Dru gList!F3:F72=FY!G4),DrugList!W3:W72)))&" days")}

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Pete" wrote:

I have the following array formula:

{=IF(G16=0,0&"
days",AVERAGE(IF((DrugList!F3:F72=FY!G3)*(DrugLis t!F3:F72=FY!G4),DrugList!W3:W72))&" days")}

it returns the following value in the cell: 114.333333333333 days.

How can I get tha formula to return 114 days (no decimals)?

Pete.



  #3  
Old April 15th, 2009, 08:56 PM posted to microsoft.public.excel.worksheet.functions
Pete
external usenet poster
 
Posts: 384
Default Cell format for an array formula containing text

Thanks it worked grat!.

Pete

"Luke M" wrote:

Use the INT function.

{=IF(G16=0,0&"
days",INT(AVERAGE(IF((DrugList!F3:F72=FY!G3)*(Dru gList!F3:F72=FY!G4),DrugList!W3:W72)))&" days")}

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Pete" wrote:

I have the following array formula:

{=IF(G16=0,0&"
days",AVERAGE(IF((DrugList!F3:F72=FY!G3)*(DrugLis t!F3:F72=FY!G4),DrugList!W3:W72))&" days")}

it returns the following value in the cell: 114.333333333333 days.

How can I get tha formula to return 114 days (no decimals)?

Pete.



 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


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