Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default Formula Problem

Bob and Niek, thanks once again.

Greg

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula Problem gwolfe Excel Worksheet Functions 3 May 2nd 08 06:15 PM
Problem with =IF(AND........ formula PSU35 Excel Worksheet Functions 5 October 2nd 07 10:08 PM
Formula problem denise Excel Discussion (Misc queries) 3 October 20th 06 08:38 PM
I have a problem with my Formula. Steved Excel Worksheet Functions 1 June 28th 06 03:08 AM
Formula problem Steved Excel Worksheet Functions 2 July 5th 05 10:53 PM


All times are GMT +1. The time now is 07:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"