+ Reply to Thread
Results 1 to 4 of 4

LOOKUP to find value that is not zero

Hybrid View

  1. #1
    Registered User
    Join Date
    02-20-2009
    Location
    Mineral, VA
    MS-Off Ver
    Excel 2003
    Posts
    73

    LOOKUP to find value that is not zero

    I have a formula in a worksheet that lists equipment in inventory. It looks at another worksheet of service work orders and verifies that, if work was done on a particular unit, do a look up and post the latest meter reading recorded on a work order for that unit.

    My formula works fine unless the latest work order doesn't have a meter reading posted yet, so it returns a zero - overwriting any previous meter reading that was stored there.

    =IF(COUNTIF('Work Orders'!$H$3:$H$1500,$C38),LOOKUP(2,1/('Work Orders'!$H$3:$H$1500=$C38),'Work Orders'!$O$3:$O$1500),"")
    How do I get the most current reading...as long as it isn't a zero?
    Last edited by cedarhill; 03-17-2009 at 01:28 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: LOOKUP to find value that is not zero

    Perhaps you want:

    =IF(COUNTIF('Work Orders'!$H$3:$H$1500,$C38),LOOKUP(2,1/(('Work Orders'!$H$3:$H$1500=$C38)*('Work Orders'!$O$3:$O$1500<>0)),'Work Orders'!$O$3:$O$1500),"")

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: LOOKUP to find value that is not zero

    Possibly?

    =IF(COUNTIF('Work Orders'!$H$3:$H$1500,$C38),LOOKUP(2,1/(('Work Orders'!$H$3:$H$1500=$C38)*('Work Orders'!$O$3:$O$1500<>0)),'Work Orders'!$O$3:$O$1500),"")
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    02-20-2009
    Location
    Mineral, VA
    MS-Off Ver
    Excel 2003
    Posts
    73

    Re: LOOKUP to find value that is not zero

    Yes, thank you both, it does exactly what I need it to do.

+ 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