Index Problem

T

TB@work

Here is what my spreadsheet looks like that I am pulling info from.

A B C
LD# City Stop Seq #
1234 Orlando 1
1234 Tampa 2
1234 Miami 3
1235 Tampa 1
1235 Miami 2

Here is the what my how I want my finished spreadsheet to look like

A B C D E F G
LD# 1 City 2 City 3 City
1234 Orlando Tampa Miami
1235 Tampa Miami

Here is the formula I'm usin
=index(spreadsheet1!B2:B7,match(spreadsheet2!A2&B1,index(spreadsheet1!A2:A7&spreadsheet1!C2:C7)))

The formula works great except if there are only 2 stops on a load. An
example is load 1235. The formula pulls in Miami in row G when I would like
for the cell to be blank. Is there something I can change in the formula to
make this happen?
 
P

Per Jessen

Hi

I added a 0 in the match function to indicate an exact match.

=index(spreadsheet1!B2:B7,match(spreadsheet2!A2&B1,index(spreadsheet1!
A2:A7­&spreadsheet1!C2:C7),0))

Regards,
Per
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Formula and Formating Help 5
Sumproduct Question 1
Sum If and Count If 2
Compare two lists for matches 3
Use Formula to sort two strings 2
How to speed up code 4
Excell Macro help 2
Complex Lookup Question 2

Top