Solved

MS Excel: Lookup First, Last and Second Last Values

Posted on 2015-02-09
2
48 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
2 Comments
 
LVL 48

Accepted Solution

by:
Rgonzo1971 earned 500 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

746 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now