ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Index Problem (https://www.excelbanter.com/excel-programming/438371-index-problem.html)

TB@work[_2_]

Index Problem
 
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 using
=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?



Per Jessen[_2_]

Index Problem
 
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

On 13 Jan., 16:01, TB@work wrote:
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 using
=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?



TB@work[_2_]

Index Problem
 
I have added the 0 and I am still having the same issue. Any other
suggestions?

"Per Jessen" wrote:

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

On 13 Jan., 16:01, TB@work wrote:
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 using
=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?


.



All times are GMT +1. The time now is 08:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com