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

Try
=sumproduct(--(sheet2!A1:A50=A1),--(sheet2!B1:B50=B1),--(sheet2!C1:C50))

Sheet2 is where the stored distances are.
--
JNW


"quinn111" wrote:

The mileage is just entered into cells, no calculation.
In this example: I have orgin, destination & mileage columns in the same
spreadsheet as the main, just off to the right.

"JNW" wrote:

how is your mileage calculation sheet set up?
--
JNW


"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.