ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Formula Problem (https://www.excelbanter.com/excel-programming/344766-formula-problem.html)

GregR

Formula Problem
 
What is wrong with this formula?

=IF(TEXT($B5,"mmm")"",TEXT($B5,"mmm"),"")

If B5 contains a date the answer is right, but if B5 is blank it still
returns a value. The expected result is if B5 is blank then C5 is
blank. TIA

Greg


Bob Phillips[_6_]

Formula Problem
 
=IF($B5<"",TEXT($B5,"mmm"),"")


--

HTH

RP
(remove nothere from the email address if mailing direct)


"GregR" wrote in message
ups.com...
What is wrong with this formula?

=IF(TEXT($B5,"mmm")"",TEXT($B5,"mmm"),"")

If B5 contains a date the answer is right, but if B5 is blank it still
returns a value. The expected result is if B5 is blank then C5 is
blank. TIA

Greg




Niek Otten

Formula Problem
 
Hi Greg,

You can easily check by entering =TEXT($B5,"mmm") in a cell; it returns
"Jan"
Instead, use =IF($B5="","",TEXT($B5,"mmm"))

--
Kind regards,

Niek Otten

"GregR" wrote in message
ups.com...
What is wrong with this formula?

=IF(TEXT($B5,"mmm")"",TEXT($B5,"mmm"),"")

If B5 contains a date the answer is right, but if B5 is blank it still
returns a value. The expected result is if B5 is blank then C5 is
blank. TIA

Greg




Gary''s Student

Formula Problem
 
Try:

=IF(B5="","",TEXT($B5,"mmm"))
--
Gary''s Student


"GregR" wrote:

What is wrong with this formula?

=IF(TEXT($B5,"mmm")"",TEXT($B5,"mmm"),"")

If B5 contains a date the answer is right, but if B5 is blank it still
returns a value. The expected result is if B5 is blank then C5 is
blank. TIA

Greg



GregR

Formula Problem
 
Bob and Niek, thanks once again.

Greg



All times are GMT +1. The time now is 11:18 PM.

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