+ Reply to Thread
Results 1 to 5 of 5

Return highest price paid row by part by customer

  1. #1
    Forum Contributor
    Join Date
    07-18-2014
    Location
    Missouri, USA
    MS-Off Ver
    2010
    Posts
    175

    Return highest price paid row by part by customer

    My report pulls the last two prices paid by customer for each part they purchase. I need a program to look at each individual customer by part. If it appears twice(last two prices paid), find the highest price and return that entire line and remove the other line. If it only appears once(they only bought it one time), return that entire line.

    Thanks for you help.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Return highest price paid row by part by customer

    Is this what you are looking for?

    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    07-18-2014
    Location
    Missouri, USA
    MS-Off Ver
    2010
    Posts
    175

    Re: Return highest price paid row by part by customer

    Thanks for your help on this. It is very close but it appears this vba is taking the largest price paid, regardless of part number, by each customer and deleting all other lines. I need it to look at each part number separately, by customer and return the highest price paid line.


    Basically, in terms of writing it out, it would say something like this. For each customer, every change in part number, return the highest paid price line and delete the other.....if there is only one line by unique part number, just return that line.

    I hope I said all this in a way you understand.

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Return highest price paid row by part by customer

    Hi rs1aj,

    See if a Pivot Table helps answer this question. Play with Pivots a bit and see what they can do for you. No VBA or Formulas are needed for Pivots. You simply pull field names around and then right click in dropdowns and or values.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  5. #5
    Forum Contributor
    Join Date
    07-18-2014
    Location
    Missouri, USA
    MS-Off Ver
    2010
    Posts
    175

    Re: Return highest price paid row by part by customer

    This will do the trick via pivot table. Thank you sir!

+ 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. Replies: 6
    Last Post: 05-28-2014, 07:24 AM
  2. Replies: 4
    Last Post: 08-15-2012, 09:49 AM
  3. Last Price Paid: VLoopup? Index/Match?
    By Excellerant in forum Excel General
    Replies: 4
    Last Post: 06-26-2012, 12:29 PM
  4. Replies: 1
    Last Post: 07-07-2006, 02:10 PM
  5. [SOLVED] Return a price based on a customer from a drop down list
    By Pete Elbert in forum Excel General
    Replies: 7
    Last Post: 04-30-2006, 10:00 PM

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