Thread: Index Problem
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Per Jessen[_2_] Per Jessen[_2_] is offline
external usenet poster
 
Posts: 703
Default 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?