Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Synchronizing Lists.

Synchronizing Lists

Written by Allen Wyatt (last updated January 23, 2023)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


3

You may have an occasion when you have two data lists that you want to "line up." For instance, column A might be a customer account number, while column B displays the customer's account balance. In columns C and D you then paste a listing of customer payments, with column C being the customer account number and column D being the payment amount. Both lists (A/B and C/D) are sorted by customer account number.

Since not all customers with balances made payments, the A/B list is not in synch with the C/D list. To get them in synch, you need to insert blank cells where needed in columns C/D (and sometimes columns A/B) so that the customer account number in column C matches the customer account number in column A.

If your goal is to match payments to balances, then there is a relatively easy way to do this, without the need to insert cells in the lists. Follow these steps:

  1. Insert three blank columns between the two lists. When done, you should have the account balances in A/B, blank columns in C/D/E, and the payments in F/G.
  2. Assuming the first account/balance combination is in cells A2:B2, enter the following formula in cell C2:
  3.      =IF(ISNA(VLOOKUP(A2,F:G,2,FALSE)),0,VLOOKUP(A2,F:G,2,FALSE))
    
  4. Copy the formula down through the rest of column C.

This formula looks in the payments columns (F/G) for any cells that match the account number in column A. If found, then the amount of the payment is returned by the formula. If a match is not located, then a zero value is returned.

The approach works well if you know that the payment columns contain only a single payment for each account. If it is possible that some accounts received multiple payments, then you need to change the formula you use in step 2:

=SUMIF(F:F, A2,G:G )

This formula, if it finds a match, adds all the payments together and returns the sum.

Of course, the example first described in this tip is just that—an example of a more pervasive problem. You may have a need to synch lists where there is only text in the lists, or where it is more difficult to do a lookup or you don't need to return a sum. In those instances, it may be best to look for a third-party solution.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (8316) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Synchronizing Lists.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Opening an HTML Page in a Macro

Excel allows you to open HTML pages within the program, which is great for some purposes. What if you want to open a ...

Discover More

Adding Paragraph Numbering

You may search high and low for a way to add automatic numbers to paragraphs in a document. You won't find the ...

Discover More

Deleting All Footnotes

Tired of all those footnotes hanging on the bottom of each page in your document? You can get rid of them in one step, as ...

Discover More

Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!

More ExcelTips (ribbon)

Converting to ASCII Text

When you work with imported or pasted data in an Excel worksheet, you may see some strange looking characters at times. ...

Discover More

Using Slashed Zeroes

To reduce the chances of confusion in presenting data, some people like to use zeroes with slashes through them. If you ...

Discover More

Previous Column Values in a Drop-Down List

Want a quick way to add non-unique values into a column? You probably know you can do this by starting to simply type in ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 1 + 1?

2023-01-23 07:20:14

Mark

This is just a database merge type of function. I use Power Query's merge functionality to do this directly within Excel.


2020-08-18 10:33:52

Cenk Gökçe

Do you have a sample macro to syncronize lists? This would be useful for me. I


2018-10-24 07:34:19

Peter Kanters

The formula in step 2 can be made easier:
=IFNA(VLOOKUP(A2,F:G,2,FALSE),0)


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.