View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default how do I move a cell based on a match of another cell in excel?

Insert a new column A, and in cell A2, enter the formula (and then copy down to match your list)

=IF(ISERROR(MATCH(B2,F:F,FALSE)),1000,ROW())

Then in a blank column beyond your "column E" list (which is now column F), enter this formula into
the cell in row 2 (and copy down to match your list):

=IF(ISERROR(MATCH(F2,B:B,FALSE)),1000,MATCH(F2,B:B ,FALSE))


Then copy / paste values for column A, and do the same for the second column of formulas. Then sort
your first list (and associated data) by column A Ascending, and the same for the second list / data
/ column of values from the formula above.

HTH,
Bernie
MS Excel MVP


"Cohutta" wrote in message
...
I have two lists of customer sales info and I want to line them up on a given
row based on customer number (columns A and E). I know about the vlookup
function, but I want to move, not copy the data. That way I can identify
those is the second group (column E) that did not have a match in the first
group (column A).