Jump to content


Photo

Vlookup


  • Please log in to reply
1 reply to this topic

#1 HHEXCEL

HHEXCEL

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 08 August 2017 - 10:04 PM

I would like to know how can I use the Vlookup function or another formula to retrieve the profit from a specific customer number. The Vlookup function works well when there is one order per each customer #. How do I retrieve the results if a Customer# has multiple entries? If the possibility of combining multiple entries into 1 entry, that would be satisfactory. I don't want to perform one at a time. I've attached a sample file, but the original file is much greater. 

 

Thank you.



#2 Jonathan

Jonathan

    Forums Administrator

  • Administrators
  • 862 posts

Posted 09 August 2017 - 07:17 PM

Hi HHExcel,

 

Your attachment didn't come through, please try again to attach it and I will take a look at your workbook. You can find instructions for attaching files here.

 

To provide an example I have created this workbook:

ExtractCustomer.png

 

In this example, I assume that you need to extract the total of the OrderValue column for a specific customer. The best way to do this is by using a pivot table.

 

You can see how to create a simple pivot table in the video lesson: Expert Skills Lesson 5-1 Create a pivot table.

You can see how to add filters to pivot tables in the video lesson: Expert Skills Lesson 5-7 Use report filter fields.

 

Here's how the pivot table looks, creating a summary of the orders:

ExtractCustomer2.png

 

If you don't want a summary but want to extract the individual records for a certain customer, you can do this using ordinary filters or slicers.

 

You can see how to use filters in the video lesson: Expert Skills Lesson 1-3 Apply a simple filter to a range.

You can see how to create slicers in the video tutorial: Expert Skills Lesson 5-8 Filter a pivot table visually using slicers.

 

I have attached a copy of my example workbook with the pivot table and slicer applied:

 

Attached File  ExtractCustomer.xlsx   15.25KB   20 downloads

ExtractCustomer3.png

 

I hope one of these options is the solution you were looking for, but please feel free to reply if you need any more help with this, and attach a copy of your example if you'd like me to take a closer look at it.


Jonathan is part of the professional team who answer Excel-related questions posted on the ExcelCentral.com forums.
Jonathan also tests our courses prior to publication and has worked on all of our ten world bestselling Excel books for Excel 2007, Excel 2010, Excel 2013, Excel 2016 for Windows and Excel 2016 for Apple Mac. Jonathan has also worked on over 850 video lessons for or video courses covering Excel 2007, Excel 2010 and Excel 2013.
As well as extensive Excel knowledge, Jonathan has worked in the IT world for over thirteen years as a programmer, database designer and analyst for some of the world's largest companies.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users