Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. 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.
by Allen Wyatt
(last updated October 4, 2016)
You may have an occasion when you have two data lists that we 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:
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, and 2013. You can find a version of this tip for the older menu interface of Excel here: Synchronizing Lists.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!
Ever need to populate some cells in your worksheet with a range of data, but in random order? Here's a handy macro to get ...Discover More
Paste information directly into a worksheet, and you may be surprised that Excel makes some of the data unusable. This ...Discover More
You may be looking for a way to have a formula determine if a particular cell has anything in it. Here's how you can find ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
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.