?
Solved

MS Excel: Lookup First, Last and Second Last Values

Posted on 2015-02-09
2
Medium Priority
?
64 Views
Last Modified: 2015-02-10
Hello,

Seeking your help on some data lookup formulas. Attached is a spreadsheet. I am trying to find the following:

1. Lookup the dataset and return the first purchase date of a given customer
2. Lookup the dataset and return the second last purchase date of a given customer
3. Lookup the dataset and return the last purchase date of a given customer

4. For each of the above dates, also return the name of the sales consultant who the customer was served by.

I've tried a few combinations of min/max and offset/index/match, but I'm a bit out of my depth.

Thanks.
ee-Help.xlsx
0
Comment
Question by:dabug80
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 52

Accepted Solution

by:
Rgonzo1971 earned 2000 total points
ID: 40600125
HI,

pls try

=SMALL(IF(C:C=G5,D:D),1) in H5
=INDEX(E:E,MATCH(G5&H5,C:C&D:D,0)) in I5
=LARGE(IF(C:C=G5,D:D),2) in K5
=+INDEX(E:E,MATCH(G5&K5,C:C&D:D,0)) in L5
=LARGE(IF(C:C=G5,D:D),1) in N5
=INDEX(E:E,MATCH(G5&N5,C:C&D:D,0)) in O5

As array formulas (Ctrl-Shift-Enter)

Regards
ee-HelpV1.xlsx
0
 
LVL 1

Author Closing Comment

by:dabug80
ID: 40601917
This is a top notch solution. Thanks so much. I've been trying to figure it out for ages. I'll have to read up on the small and large worksheet functions. Plus I didn't know you could combined match references like that. You've certainly taught me something. You're a champ.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question