+ Reply to Thread
Results 1 to 5 of 5

Formula returning a value when no data present

  1. #1
    Registered User
    Join Date
    03-09-2012
    Location
    ft worth, tx
    MS-Off Ver
    Excel 2003
    Posts
    27

    Formula returning a value when no data present

    Hello All,

    I am using the following formula to analyze data set A and then take an average and put it into the cell where the formula is:

    =SUM((LOOKUP(ROUND(B397,0),{0,6,12,15,24},{1,2,3,4,5}))+((LOOKUP(ROUND(B399,0),{0,180,300,360,420},{1,2,3,4,5})))+(LOOKUP(ROUND(B396,0),{0,75,100,150,200},{1,2,3,4,5}))+(LOOKUP(ROUND(B398,0),{0,4,6,10,20},{5,4,3,2,1})))/4

    The formula works perfectly except when I clear data set A, the above formula returns a value of "2". This happens when no data is present in the cells.

    Thanks for the assistance with this.

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Formula returning a value when no data present

    hi cmac7872. a blank is considered as "0", hence it's returning the result_vector in your LOOKUP formula. SUM(1 + 1 + 1 + 5) / 4

    tell us how you want to deal with it & we can assist you.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    03-09-2012
    Location
    ft worth, tx
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Formula returning a value when no data present

    I want the formula to return no value (""), if there is no data present in the cells.

    Thanks in advance.

  4. #4
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Formula returning a value when no data present

    How about:

    [code]
    =IF(OR(B396="",B397="",B398="",B399=""),"",your formula)
    [code]
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  5. #5
    Registered User
    Join Date
    03-09-2012
    Location
    ft worth, tx
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Formula returning a value when no data present

    Beautiful! Worked perfectly! Thanks so very much!

    =IF(OR(B17="",B19="",B16="",B18=""),"",SUM((LOOKUP(ROUND(B17,0),{0,6,12,15,24},{1,2,3,4,5}))+((LOOKUP(ROUND(B19,0),{0,180,300,360,420},{1,2,3,4,5})))+(LOOKUP(ROUND(B16,0),{0,75,100,150,200},{1,2,3,4,5}))+(LOOKUP(ROUND(B18,0),{0,4,6,10,20},{5,4,3,2,1})))/4)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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