If formula question
Manage your personal finances in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: If formula question

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    75
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    This seems very simple but for some reason I can not get it to work for me.

    What I have it a Vlookup in a sereis of cells that ultimately are added together and summed.

    In the column that adds the values together I place the following if formula:
    =+IF(E9="#N/A",0,D9*E9)

    The idea being if there is no value for the lookup table to lookup up it places a #N/A in that cell, which in turn wreaks havoc on my addition cell and well screws the column summing all up. so I thought I might out smart excel and tell it to place a zero in the addition column when ever it sees the #n/a, this did not work , it just place #n/a in the addition cell. I don't know why it did not work. Anyone out there know where I am going wrong here?

    Thanks in advance

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Austin, Texas USA
    Posts
    11,654
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    =IF(ISNA(E9),0,D9*E9)

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Location
    London, UK
    Posts
    167
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    don't know if this is a typo, but equations start

    =IF...

    and not

    =+IF...

    Anyway, I normall adjust the VLOOKUP to take care of this in one go... using the TYPE function that returns value 16 in the case of an error...

    for example...


    =VLOOKUP(A1,rangename,2,false)

    ...would become...

    =IF(TYPE(VLOOKUP(A1,rangename,2,false))=16,0,VLOOKUP(A1,rangename,2,false))

    ...or you could substitute this 0 value for a text string like "-" for display purposes, etc... alternatively, in the cell you were trying to put your original solution, you could use...

    =IF(TYPE(E9)=16,0,D9*E9)


User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com