![]() |
using a conditional suffix in text function format syntax=text(value,format_text)
I can employ this number format
[=1]# "month";[1]# "months" so that if I enter 1 in a cell it will display : 1 month but if I enter 2 it will display : 2 months. what I want to do is use that same format as part of the Text function (I'll eventually be employing it as part of a concatenated string). i.e. =TEXT(A1,"[=1]# "month";[1]# "months"") but the problem is obviously that using quotes to signify the text suffix, is throwing out the syntax for the function. I can get round it the long way using IFs, but it's clunky. Is there some secret excel guru juice that will help me out? |
using a conditional suffix in text function format syntax =text(value,format_text)
ONe way:
=TEXT(A1,"[=1]0 ""month"";0 ""months""") In article , Brotherharry wrote: I can employ this number format [=1]# "month";[1]# "months" so that if I enter 1 in a cell it will display : 1 month but if I enter 2 it will display : 2 months. what I want to do is use that same format as part of the Text function (I'll eventually be employing it as part of a concatenated string). i.e. =TEXT(A1,"[=1]# "month";[1]# "months"") but the problem is obviously that using quotes to signify the text suffix, is throwing out the syntax for the function. I can get round it the long way using IFs, but it's clunky. Is there some secret excel guru juice that will help me out? |
All times are GMT +1. The time now is 10:01 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com