ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Cell format for an array formula containing text (https://www.excelbanter.com/excel-worksheet-functions/227816-cell-format-array-formula-containing-text.html)

Pete

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.




Luke M

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.




Pete

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.





All times are GMT +1. The time now is 04:46 AM.

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