+ Reply to Thread
Results 1 to 4 of 4

Lookup Function not working

  1. #1
    Registered User
    Join Date
    07-25-2006
    Posts
    6

    Lookup Function not working

    Here is my function:

    =LOOKUP(A18,'Week 1 Totals'!A18:A94,'Week 1 Totals'!J18:J94)

    For some reason this is not working for me. I am trying to find a total number of hours worked for a given job. A18 is a job number. A18:A94 on week 1 totals sheet is a range where the job numbers are located for each job. J18:J94 on week 1 totals sheet is where the total hours are for each job. For some reason this function is returning 0 even though J18 = 1 where A18 on the current sheet matches A18 on the week 1 totals sheet. So it should return 1. I cant figure out why its not working. Any one know why.

  2. #2
    paul
    Guest

    RE: Lookup Function not working

    vlookup is better =vlookup(A18,'Week 1 Totals'!A18:J94,10,false)
    i cant count so you might have to play with the col num (10)
    --
    paul
    [email protected]
    remove nospam for email addy!



    "hcamelion" wrote:

    >
    > Here is my function:
    >
    > =LOOKUP(A18,'Week 1 Totals'!A18:A94,'Week 1 Totals'!J18:J94)
    >
    > For some reason this is not working for me. I am trying to find a
    > total number of hours worked for a given job. A18 is a job number.
    > A18:A94 on week 1 totals sheet is a range where the job numbers are
    > located for each job. J18:J94 on week 1 totals sheet is where the
    > total hours are for each job. For some reason this function is
    > returning 0 even though J18 = 1 where A18 on the current sheet matches
    > A18 on the week 1 totals sheet. So it should return 1. I cant figure
    > out why its not working. Any one know why.
    >
    >
    > --
    > hcamelion
    > ------------------------------------------------------------------------
    > hcamelion's Profile: http://www.excelforum.com/member.php...o&userid=36736
    > View this thread: http://www.excelforum.com/showthread...hreadid=568541
    >
    >


  3. #3
    Registered User
    Join Date
    07-25-2006
    Posts
    6

    That worked but one problem.

    That worked great but there is one problem: Week 1 Totals sheet may or may not have the job # I am calling as only jobs that were worked that week show up on that sheet. When vlookup does not find the corrosponding job number it returns #N/A. I need it to return 0 when the job is not on the week 1 totals sheet. Any ideas. I tried doing an if...if the vlookup = #N/A display 0 if not display the vlookup result. But I guess that doesnt work with errors. Any ideas.

  4. #4
    Forum Contributor
    Join Date
    04-25-2006
    Posts
    215
    Use ISERROR

    =IF(ISERROR(VLOOKUP(A18,'Week 1 Totals'!A18:J94,10,FALSE)),0,VLOOKUP(A18,'Week 1 Totals'!A18:J94,10,FALSE))

    -ep

+ 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