+ Reply to Thread
Results 1 to 2 of 2

hlookup work if exists

  1. #1
    Registered User
    Join Date
    09-28-2009
    Location
    Tucson, Arizona
    MS-Off Ver
    Excel 2003
    Posts
    17

    hlookup work if exists

    Hi, first of all, I would like to thank all of you for helping me so much throughout the weeks I have been on here and would really like to say slowly but surely I am learning excel.

    I have a sample workbook I will put at the end, but I need someway for hlookup to work overall even if one of the hlookups doesn't.

    IE (this is from the sample workbook): =HLOOKUP("A",Sheet2!A1:C1,2,0)+HLOOKUP("A",Sheet3!A1:C3,2,0)+HLOOKUP("A",Sheet4!A1:C3,2,0).

    If "A" isn't in one of the sheets no matter what it will return #N/A. Is there some way (I'm sure there is) for me to make these #N/A hlookups just act as zero?
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    08-14-2008
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    103

    Re: hlookup work if exists

    Hi,
    Try the following. it checks to see if each term is an error, and if so returns 0, else it evaluates the Hlookup


    =IF(ISERROR(HLOOKUP("A",Sheet2!A1:C1,2,0)),0,HLOOKUP("A",Sheet2!A1:C1,2,0))+IF(ISERROR(HLOOKUP("A",Sheet3!A1:C3,2,0)),0,HLOOKUP("A",Sheet3!A1:C3,2,0))+IF(ISERROR(HLOOKUP("A",Sheet4!A1:C3,2,0)),0,HLOOKUP("A",Sheet4!A1:C3,2,0))

+ 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