ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Text in formula (https://www.excelbanter.com/excel-discussion-misc-queries/62095-text-formula.html)

StephanieH

Text in formula
 
I want to display the sentence "Average Total Accounts: Oct - Apr"
based on a formula.
A23 = November-05
So far, I have the formula ="Average Total Accounts: "&TEXT(A23-1, "mmm")
which displays "Average Total Accounts: Oct", so I know I'm close.

Where I'm having a problem is adding the " - " between Oct and Apr and
adding the formula to display Apr.

Niek Otten

Text in formula
 
="Average Total Accounts: "&TEXT(A23-1, "mmm")&" -
"&TEXT(DATE(YEAR(A23),MONTH(A23)+5,1),"mmm")

--
Kind regards,

Niek Otten

"StephanieH" wrote in message
...
I want to display the sentence "Average Total Accounts: Oct - Apr"
based on a formula.
A23 = November-05
So far, I have the formula ="Average Total Accounts: "&TEXT(A23-1, "mmm")
which displays "Average Total Accounts: Oct", so I know I'm close.

Where I'm having a problem is adding the " - " between Oct and Apr and
adding the formula to display Apr.




StephanieH

Text in formula
 
Yay. Thanks Niek.

"Niek Otten" wrote:

="Average Total Accounts: "&TEXT(A23-1, "mmm")&" -
"&TEXT(DATE(YEAR(A23),MONTH(A23)+5,1),"mmm")

--
Kind regards,

Niek Otten

"StephanieH" wrote in message
...
I want to display the sentence "Average Total Accounts: Oct - Apr"
based on a formula.
A23 = November-05
So far, I have the formula ="Average Total Accounts: "&TEXT(A23-1, "mmm")
which displays "Average Total Accounts: Oct", so I know I'm close.

Where I'm having a problem is adding the " - " between Oct and Apr and
adding the formula to display Apr.






All times are GMT +1. The time now is 03:59 PM.

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