Jul 26 2019 12:39 PM
Is there any way to copy a 9 digit number that is in one cell and paste it into 9 separate cells, one digit in each cell, and vice versa?
Jul 26 2019 01:16 PM
Jul 26 2019 01:32 PM - edited Jul 26 2019 02:02 PM
Hi
If you type 9 digits in cell A1 (Note that digits are right aligned) and then say in cell C1 you need the first digit only, then
in C1 type:
=RIGHT(LEFT($A1,COLUMNS($A$1:A1)),1)*1
Copy this function to the right 8 more columns and you get the 9 digits parsed , each in a separate cell and they are still recognized as numbers (Right aligned)
Here is a screenshot of what I did
=RIGHT(LEFT($A1,COLUMNS($A$1:A1)),1)*1
Note that using only text functions such as Right, Mid, Left,Replace, Substitute... >> returns a TEXT which is Left Aligned and cannot be reused in calculations...
Also Note that although you could split the number into multiple columns by using "Text To Column" >> it's not dynamic and if the source column expands >> You will have to repeat the process.
to regroup them you can use one of the following:
Note that All Re-grouping options will return TEXT (Left Aligned) so to Change it back to a Number (Right aligned) >> Multiply by one:
=(C1&D1&E1&F1&G1&H1&I1&J1&K1)*1
Hope That Helps
Nabil Mourad
Jul 26 2019 01:52 PM
For the collection:
If numbers are in the column, they could be split by Data->Text to Columns with fixed width and destination into another columns.
To combine back as
=SUMPRODUCT(B1:J1*{100000000,10000000,1000000,100000,10000,1000,1000,10,1})
Like this