+ Reply to Thread
Results 1 to 4 of 4

Getting Excel to return a blank field regardless of cell formatting

  1. #1
    Forum Contributor
    Join Date
    08-20-2009
    Location
    Plymouth, England
    MS-Off Ver
    Excel 2013
    Posts
    149

    Getting Excel to return a blank field regardless of cell formatting

    Hi all,

    I currently have the following formula:

    =IF($B$1=1,'4 Week Rota'!O13,IF($B$1=2,'4 Week Rota'!O21,IF($B$1=3,'4 Week Rota'!O29,IF($B$1=4,'4 Week Rota'!O37))))

    When there is no value in 'Week Rota'!O13 Excel is returning 0:00 because the cell is formatted to [h]:mm. Is there a way for nothing to be returned regardless of format?

    Secondly, I'm still rather a novice at Excel and am assuming there would be a much shorter (and tidier) version of the formula above?

    Thanks in advance,

    Luke
    Last edited by lukela85; 11-26-2013 at 03:04 PM.

  2. #2
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,412

    Re: Getting Excel to return a blank field regardless of cell formatting

    Hi lukela85,
    See file attached.
    Using CHOOSE function and custom number formatting [h]:mm;;
    Attached Files Attached Files
    GC Excel

    If this post helps, then click the star icon (*) in the bottom left-hand corner of my post to Add reputation.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Getting Excel to return a blank field regardless of cell formatting

    Hi,

    A more efficient formula would be

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    You could suppress the zero by using the Excel Options to NOT display 0 for cells that result in zero. Office Button..Excel Options..Advanced and scroll down to the 'Display Options for this worksheet'

    Alternatively you could use a variation of the above

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    but you may feel that's akin to using the proverbial sledgehammer to crack a nut!
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Contributor
    Join Date
    08-20-2009
    Location
    Plymouth, England
    MS-Off Ver
    Excel 2013
    Posts
    149

    Re: Getting Excel to return a blank field regardless of cell formatting

    Thanks to both for your help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 09-20-2013, 01:43 PM
  2. return field name if cell is blank
    By freebird_wr in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-09-2013, 09:35 AM
  3. Replies: 4
    Last Post: 09-26-2012, 11:39 AM
  4. (multiple) VLOOKUP Function to return blank field on false
    By frank_a in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-10-2009, 01:39 AM
  5. [SOLVED] Formatting Excel Cell to a text field
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-07-2006, 11:40 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1