how do I move a cell based on a match of another cell in excel?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top