Google Exceltip.com
Account Icon
Shopping Cart
CheckOut

» Combining the Contents of Every N Number of Cells into One Value




Problem:

Column A contains an imported list of addresses; however, each address has been distributed over 4 cells.
Therefore, we want to combine the contents of each block of four cells so that the addresses will appear as complete entities.

Solution:

Use the IF, MOD, and ROW functions as shown in the following formula:
=IF(MOD(ROW()-ROW($A$2),4)=0, A2&" "&A3&" "&A4&" "&A5," ")
Enter the formula in cell B2 and then copy it down the column until all the addresses in column A are recombined.
Rate this tip
12 34 5
  RATING: 2.91
  VIEWS: 11761
Rajesh Aggarwal wrote on December 31, 1969 18:00 EST
Its really good, I was using "&" but that doesn't give the space between two columns.

Good



REGISTERED USERS click here to post comments


GUESTSclick here to Register
Name
Comment Title
Comments


Terms and Conditions of use
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.

Copyright © 2003 ExcelTip.com
Microsoft, Microsoft Excel is a U.S. registered trademark of Microsoft Corporation