View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Rob Rob is offline
external usenet poster
 
Posts: 718
Default Comparison of Columns

Thank you both for your time

"zvkmpw" wrote:

On Jan 21, 6:23 am, Rob wrote:
I have three columns thast represent Set numbers, I want to compare the
values in column "B" with those in column "A" find where they match and then
calculate how many rows they have moved either up or down and put the answer
in column "C"

Col A Col B Col C
1127 1129 +1
1129 1130 +1
1130 1132 +3
1102 1102 0
1131 1131 0
1132 1133 +1
1133 1135 +1
1135 1137 +2
1062 1138 +2
1137 1062 -1
1138 1141


Here's one way with Excel 2003.

First, in C1 put
=IF(COUNTIF(A:A,B1)=0,"",MATCH(B1,A:A,0)-ROW())
and copy downward.

Then select column C and use
Format Cells Number
and for "Category" choose "Custom"
and for "Type" put
+0;-0;0

Hope this helps getting started.
.