+ Reply to Thread
Results 1 to 6 of 6

2 lists: how to compare and calculate difference in item numbers

  1. #1
    Registered User
    Join Date
    03-14-2007
    Posts
    32

    2 lists: how to compare and calculate difference in item numbers

    Hi,

    I have a list that is updated monthly which contains two columns:
    Machinery code | Number of Devices

    Under devices, we list machinery codes, and how many we have for each of them under Number of Devices.

    What I'm trying to achieve is to compare the difference in numbers for each machinery code between two months (substract the number for each machinery code), but I'm not sure how?

    Please note, some of the machinery codes may be present in one month but not in the following month (included in attached example), so I think a lookup for each machinery code would need to be performed first?

    Thank you for your help.

    Steve
    Attached Files Attached Files

  2. #2
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: 2 lists: how to compare and calculate difference in item numbers

    how about like this
    =IFERROR(D3-INDEX($B$3:$B$23,MATCH(C3,$A$3:$A$23,0)),D3)
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  3. #3
    Registered User
    Join Date
    03-14-2007
    Posts
    32

    Re: 2 lists: how to compare and calculate difference in item numbers

    Thanks for your response.
    This doesn't seem to work, maybe because I'm using Excel 2003?

    Steve

  4. #4
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: 2 lists: how to compare and calculate difference in item numbers

    ooppss.
    get rid of the iferror that's for higher versions.

    then you can have the iserror instead

    =IF(ISERROR(D3-INDEX($B$3:$B$23,MATCH(C3,$A$3:$A$23,0))),D3,D3-INDEX($B$3:$B$23,MATCH(C3,$A$3:$A$23,0)))

  5. #5
    Registered User
    Join Date
    03-14-2007
    Posts
    32

    Re: 2 lists: how to compare and calculate difference in item numbers

    Brilliant, thank you!

  6. #6
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: 2 lists: how to compare and calculate difference in item numbers

    Your very much welcome anytime. Thanks also for the start tap.

    Regards,
    Vladimir

+ 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