View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
quinn111 quinn111 is offline
external usenet poster
 
Posts: 11
Default comparing 2 columns info to fill 3rd column

Thanks Peter.
That works, except I changed the values on the formula to absolutes ($) (see
below), but when I copy it, it doesn't work.
Please help.

"peter" wrote:

Try this,
copy this matrix starting in cell c34.

1 2 3 4 5
a 5 6 11 16 21
b 6 7 12 17 22
c 7 8 13 18 23
d 8 9 14 19 24
e 9 10 15 20 25


c 4

18
=OFFSET($C$34,MATCH(C42,$C$35:$C$39,0),MATCH(D42,$ D$34:$H$34,0))

peter


"quinn111" wrote:

I have 2 columns (i.e. origin & destination) & I want it to compare to data
in other part of spreadsheet to fill in miles between origin & destination.

For example: Chicago to Des Moines. I have Chicago in the origin column
and Des Moines in the destination column. I have the miles already
calculated for that run in another part of the spreadsheet, so every time I
fill in the orgin as Chicago & Destination as Des Moines, I want the correct
miles to fill in the mileage column.