+ Reply to Thread
Results 1 to 8 of 8

Leaving cells blank when there's no data

  1. #1
    Registered User
    Join Date
    10-06-2016
    Location
    Indianapolis, USA
    MS-Off Ver
    2013
    Posts
    2

    Leaving cells blank when there's no data

    Hey everybody,
    I'm trying to work out a way to keep some cells blank when there's no data in them. I'm using the =Max(B4:F4) function to get the largest number in the row, but I'd like the cell that displays the max number (G4) to be blank when there's no data inputted in the row. I've tried everything I can think of, but to no avail. Does anyone have any suggestions?

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Leaving cells blank when there's no data

    Try this...

    =IF(COUNT(B4:F4),Max(B4:F4),"")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    Re: Leaving cells blank when there's no data

    Hi Tony,

    Out of interest how does the 'logical test' element work? I'm struggling to understand how the IF statement would equate a count with a TRUE/FALSE output when you're not comparing it to anything, e.g >0? Does it regard anything 1 and above as TRUE and all 0's FALSE?

    Regards,

    Snook
    Last edited by The_Snook; 10-06-2016 at 10:22 AM.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Leaving cells blank when there's no data

    Quote Originally Posted by The_Snook View Post
    Does it regard anything 1 and above as TRUE and all 0's false?
    In this application, yes, as the count can only be an integer.

    Technically, ANY number other than 0 will evaluate as TRUE and 0 will evaluate as FALSE.

    1 = TRUE
    7 = TRUE
    0.5 = TRUE
    0.000000000001 = TRUE
    0 = FALSE

  5. #5
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    Re: Leaving cells blank when there's no data

    Interesting, cheers.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Leaving cells blank when there's no data



    -------------

  7. #7
    Registered User
    Join Date
    10-06-2016
    Location
    Indianapolis, USA
    MS-Off Ver
    2013
    Posts
    2

    Re: Leaving cells blank when there's no data

    That worked beautifully.

    Thank you very much.

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Leaving cells blank when there's no data

    You're welcome. Thanks for the feedback!

+ 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. Copying a formula but leaving the cells blank until data added
    By Jacbee58 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-03-2016, 07:08 AM
  2. Replies: 13
    Last Post: 10-05-2015, 08:59 AM
  3. Replies: 11
    Last Post: 09-15-2014, 02:36 AM
  4. Replies: 13
    Last Post: 02-05-2013, 09:29 AM
  5. Replies: 8
    Last Post: 01-28-2013, 01:10 AM
  6. Replies: 1
    Last Post: 03-21-2012, 01:20 PM
  7. [SOLVED] MACRO - Unmerge cells and delete blank columns, leaving data colum
    By Alex Sander in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-08-2006, 07:15 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