View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] sbitaxi@gmail.com is offline
external usenet poster
 
Posts: 158
Default match up columns and move data

On Sep 11, 11:06*am, ngg wrote:
I have 2 columns with numbers in them.(they are much bigger than my
examples). All numbers in column B exist in column A but not all numbers in
column A exist in column B. What I need to do is match up B with A. So I need
to find the number 2 in column A and then move the 2 down in column B so it
aligns with the 2 in column A. Is there a quick and easy way to do this? I
have listed my desired result below.

A * * * * * * * * B

1 * * * * * * * * 2 * * * * * * * *
2 * * * * * * * * 4
3 * * * * * * * * 5
4 * * * * * * * * 8
5
6
7
8

Desired result

A * * * * * * * * B

1
2 * * * * * * * * *2
3
4 * * * * * * * * *4
5 * * * * * * * * *5
6
7
8 * * * * * * * * *8

ngg

--
ngg


You could put a formula in the column instead of sorting

Insert a column after B. Put this in Column C (or any other available
column).

=IF((COUNTIF(B:B,A1))0,A1,"")

That will look in column B for the value in A and return the value of
A if it exists in B, in the same row as the value in A. If not, the
value will be blank. Then you can copy the range with the formula,
Paste SpecialValues over column B.


Steven