ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Lookup Function not working (https://www.excelbanter.com/excel-worksheet-functions/103303-lookup-function-not-working.html)

hcamelion

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.


--
hcamelion
------------------------------------------------------------------------
hcamelion's Profile: http://www.excelforum.com/member.php...o&userid=36736
View this thread: http://www.excelforum.com/showthread...hreadid=568541


paul

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

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



hcamelion

Lookup Function not working
 

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.


--
hcamelion
------------------------------------------------------------------------
hcamelion's Profile: http://www.excelforum.com/member.php...o&userid=36736
View this thread: http://www.excelforum.com/showthread...hreadid=568541


edwardpestian

Lookup Function not working
 

Use ISERROR

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

-ep


--
edwardpestian
------------------------------------------------------------------------
edwardpestian's Profile: http://www.excelforum.com/member.php...o&userid=33809
View this thread: http://www.excelforum.com/showthread...hreadid=568541



All times are GMT +1. The time now is 02:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com