View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Sam Wilson Sam Wilson is offline
external usenet poster
 
Posts: 523
Default Complex Compare Values, and Copy/Paste if in One Sheet but Not Oth

If the two columns are sorted then you can use a simple loop I think...

if .offset(i,0) in one sheet is equal to .offset(i,0) in the other then do
nothing. If it's not then because both columns are sorted you can insert the
row from the 'lesser' value in before the row with the 'greater' value, and
then move to the next loop.


"ryguy7272" wrote:

I am looking for a way of testing values, in Column A, on two sheets. I have
a sheet named €˜Analysis of Interest Current and €˜Analysis. I know
€˜Analysis of Interest Current has 7 numbers that €˜Analysis does not have;
these are account numbers. I want to test the values in these two sheets,
and if a number exists on €˜Analysis of Interest Current but not on
€˜Analysis, then I want to copy the row and insert it, in chronological
order, into €˜Analysis; insert the whole row in the cell below.

For instance, I have account number 7200-0147 (just a number; no text in the
cell) in €˜Analysis of Interest Current. I know this account is not in
€˜Analysis, but I do have account 7200-0146 in €˜Analysis. Basically, I
wanted to copy/paste the row with 7200-0147 below the row with 7200-0146.

Im sure it can be done, but not sure how difficult it is. Does anyone here
have such a macro, or similar code that is easily modified to do what I
described above? If so, please share.

TIA!!!
Ryan---


--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.