+ Reply to Thread
Results 1 to 3 of 3

Need to compare one list to another on an invoice and sum up associated costs in matches.

  1. #1
    Registered User
    Join Date
    01-26-2021
    Location
    New Jersey, USA
    MS-Off Ver
    Microsoft Office Professional Plus 2016
    Posts
    5

    Need to compare one list to another on an invoice and sum up associated costs in matches.

    To start, my apologies if this makes no sense. Explaining this is a little tough but I have a feeling there's a way to do it. I can try to better explain if anyone needs clarification.

    I work in a hospital pharmacy and am trying to simplify a job process for our secretary. Basically this job duty for her is to go through the invoices and separate the "chemo" drugs out and provide a total cost just for those drugs. This same process needs to be done for a few different classes of drugs but I can take care of the rest once I have a formula.

    I'm trying to make an excel document that allows her to paste the entire contents of the CSV version of the invoice (downloaded from the wholesaler) into the main tab labeled "Paste Here". I want the second tab, labeled "Results", to give a count for all drugs of each class (chemo in this case), as well as a total cost. The third tab is labeled "Sorting Data" and contains all of the drugs that need to be segregated from the invoice.

    My main goal is to have a formula located in cell B3 in the "Results" tab to look through cells J17 - J82 on the "paste here tab", and compare all values with cells A2 - A86 on the "Sorting Data" tab. If there are matches I want it to sum up all of the costs associated with those medications, and the costs are located in cells P17-P82 on the "Paste Here" tab. For example, if two different drugs are on the chemo list within the invoice I want just those two costs totaled up. Same thing if there are more.

    I understand that I would have to make adjustments to the ranges to accompany larger invoices, which I'm comfortable doing, I just can't seem to wrap my head around the logic. I have a sample document attached, with the areas in question all highlighted. I can duplicate this formula, if there actually is one, and make it work for the other fields on my own.

    Many thanks to anyone who feels they're up for this task! It would help me greatly, as well as help me learn how to do more advanced formulas on here.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,781

    Re: Need to compare one list to another on an invoice and sum up associated costs in match

    Results




    A
    B
    C
    D
    E
    1
    Chemo
    N° CHEMO
    2
    Total Cost
    28.95
    2




    E2=SUMPRODUCT(--ISNUMBER(MATCH('Sorting Data'!A2:A86,'Paste Here'!J17:J82,0)))

    B2=SUMPRODUCT(SUMIF('Paste Here'!J17:J82,'Sorting Data'!A2:A86,'Paste Here'!P17:P82))

  3. #3
    Registered User
    Join Date
    01-26-2021
    Location
    New Jersey, USA
    MS-Off Ver
    Microsoft Office Professional Plus 2016
    Posts
    5

    Re: Need to compare one list to another on an invoice and sum up associated costs in match

    That did it, thank you so much!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Generate list of invoice dates based on start date and invoice frequency
    By yasmin89 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-14-2020, 02:31 PM
  2. [SOLVED] Want to extract partial matches from a list and add to existing list of retreived matches
    By PeteABC123 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-29-2019, 02:31 PM
  3. [SOLVED] Summing the matches of one column only if its corresponding description matches a list
    By bishop-jese-erl in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 02-19-2015, 04:26 PM
  4. Replies: 3
    Last Post: 07-28-2014, 08:57 PM
  5. Replies: 1
    Last Post: 09-26-2013, 12:16 PM
  6. [SOLVED] Compare Col A across 2 Sheets in different Workbooks, Copy Matches to MASTER list, H/L NON
    By ali.whitaker in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-09-2012, 04:49 AM
  7. compare current mortagage costs to new mortagage costs
    By NEW2TECHBZ in forum Excel General
    Replies: 1
    Last Post: 04-05-2006, 03:47 AM

Tags for this Thread

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