+ Reply to Thread
Results 1 to 6 of 6

fix formula for a 0 if blank space

  1. #1
    Registered User
    Join Date
    08-28-2012
    Location
    Weslaco,TX
    MS-Off Ver
    Excel 2003
    Posts
    6

    fix formula for a 0 if blank space

    Well I am trying to fix this formula for my work and having issues with it. It works great for my values and chart location but if a space is blank I want it to show a 0. Any help? My code is

    =IF(I3=TABLE!$A$1,VLOOKUP(F3,TABLE!$A$3:$C$5,2),IF(I3=TABLE!$E$1,VLOOKUP(F3,TABLE!$E$3:$G$5,2),IF(I3=TABLE!$I$1,VLOOKUP(F3,TABLE!$I$3:$K$5,2),IF(I3=TABLE!$M$1,VLOOKUP(F3,TABLE!$M$3:$O$23,2),IF(I3=TABLE!$Q$1,VLOOKUP(J3,TABLE!$Q$3:$S$12,2,))))))

    Any help is appreciated.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: fix formula for a 0 if blank space

    Hi sacrous,

    Welcome to the forum.

    if a space is blank I want it to show a 0.
    Where ? give the reference... also it would be better if you can attach a sample workbook. Thanks.


    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    08-28-2012
    Location
    Weslaco,TX
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: fix formula for a 0 if blank space

    I would like to add it at the end with I3 as the reference cell. All of the formula works around I3. All those work and look at my table fine. Would attach a document but cant do that as the only one I am using this code has personnel information. Any Ideas.

  4. #4
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: fix formula for a 0 if blank space

    Perhaps..this is what you want

    IF(I3="",0,your_formula)
    Last edited by Ace_XL; 08-28-2012 at 02:47 AM.
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  5. #5
    Registered User
    Join Date
    08-28-2012
    Location
    Weslaco,TX
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: fix formula for a 0 if blank space

    That sort of worked
    =IF(I3="",0,IF(I3=TABLE!$A$1,VLOOKUP(F3,TABLE!$A$3:$C$5,2),IF(I3=TABLE!$E$1,VLOOKUP(F3,TABLE!$E$3:$G$5,2),IF(I3=TABLE!$I$1,VLOOKUP
    (F3,TABLE!$I$3:$K$5,2),IF(I3=TABLE!$M$1,VLOOKUP(F3,TABLE!$M$3:$O$23,2),IF(I3=TABLE!$Q$1,VLOOKUP(J3,TABLE!$Q$3:$S$12,2,)))))))

    It applied the Zero to the blank but now only the first IF in my formula works. Close but getting there.

    ---------- Post added at 01:41 AM ---------- Previous post was at 01:37 AM ----------

    Lol I forgot a ( before the IF starting my formula. It works great now. ^^ Thanks a lot Ace_XL

  6. #6
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: fix formula for a 0 if blank space

    @ sacrous

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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