+ Reply to Thread
Results 1 to 4 of 4

Matching and arriving at Discounts for Various Vendors

  1. #1
    Forum Contributor
    Join Date
    10-18-2016
    Location
    Chicago, USA
    MS-Off Ver
    Office 365
    Posts
    220

    Red face Matching and arriving at Discounts for Various Vendors

    Hi All,

    Hope you are doing well!...I am trying to match the vendor discounts from a reference file and calculate the net required discount....Following are the rules that I am trying to achieve..

    With regard to the reference file :


    For each vendor if the net discount in the reference tab is greater than or equal to the discount in the original tab then the required discount should be the net discount in the reference tab...

    For each vendor if the net discount in the reference tab is less than the discount in the original tab then the required discount is the discount in the original tab....

    Also for vendors that are not present in the reference tab the required discount is the discount present in the original tab...

    Can you please help me with the formula to achieve the same....Appreciate your help!...

    I have attached the excel workbook....Also I have highlighted the answer column(Required ) in the original tab to be yellow..

    Thanks,
    Arun
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Matching and arriving at Discounts for Various Vendors

    Use this formula in D2:

    =IFERROR(IF(VLOOKUP(TRIM(A2),'Reference '!$A:$B,2,0)>C2,VLOOKUP(TRIM(A2),'Reference '!$A:$B,2,0),C2),C2)

    then copy down. You have a space at the end of each name in column A, hence the need for the TRIM function.

    Hope this helps.

    Pete

  3. #3
    Forum Contributor
    Join Date
    10-18-2016
    Location
    Chicago, USA
    MS-Off Ver
    Office 365
    Posts
    220

    Re: Matching and arriving at Discounts for Various Vendors

    Thanks Pete_UK....Really appreciate your help!...

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Matching and arriving at Discounts for Various Vendors

    You're welcome - thanks for the rep.

    Here's a shorter version of the formula, which only involves one VLOOKUP:

    =IFERROR(MAX(VLOOKUP(TRIM(A2),'Reference '!$A:$B,2,0),C2),C2)

    Hope this helps.

    Pete

+ 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. [SOLVED] How is Excel Arriving at This No?
    By Dal123 in forum Excel General
    Replies: 7
    Last Post: 01-26-2018, 12:48 PM
  2. Arriving at a percentage
    By bawlmer in forum Excel General
    Replies: 2
    Last Post: 10-30-2017, 04:47 PM
  3. Arriving Due Balance through fifo Kncok off Method
    By srinivasan1965 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-09-2016, 07:03 AM
  4. Replies: 6
    Last Post: 11-27-2013, 10:28 PM
  5. Lookup formula to pick up first arriving values
    By Excel Dumbo in forum Excel General
    Replies: 2
    Last Post: 12-12-2012, 11:51 PM
  6. [SOLVED] Collecting Data from one WB to another WB and then Final values arriving - Time & Pay
    By skhari in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 08-01-2012, 01:39 PM
  7. [SOLVED] .xls email attachments are arriving at the recipient as .dat file.
    By UK-Graham in forum Excel General
    Replies: 4
    Last Post: 02-11-2005, 03:06 PM

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