Help? Can't seem to split to digits well!

Noobachu

New Member
Joined
Jun 28, 2011
Messages
7
Would someone please help? I have a column of data values between 4 and 7 digits in length. I need to split them into separate columns so that they line up on the right, with blanks placed for non-existant significant figures; that is, the numbers
1111678 and
1234
will have 8 and 4 in a column, 3 and 7 in a column, 6 and 2 in a column, 1 and 1 in a column, and blanks for the ten-thousand, hundred-thousand, and millions places for the row containing 1234. It's important that I don't have leading zeros (I was able to do it with MID() and Text(), but it gave me leading zeros) so that I can count the number of zeros accurately in, say, the hundred-thousands place.
Thanks!
~A Noob

P.S. I'm using Excel for Mac, 2008.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Like this?
Excel Workbook
ABCDEFGH
111116781111678
212341234
Sheet


Now you can copy them down.
If you have xl2007 or later this can be shorter.

It's cumbersome to manually alter the -6,-5,-7 etc. on the first row so you could tweak so that you can copy across and down from just one cell:

<table style="font-family:Arial; font-size:10pt; border-style: groove ;border-color:#00ff00;background-color:#fffcf9; color:#000000; "><tr><td>Spreadsheet Formulas</td></tr><tr><td><table style="font-family:Arial; font-size:9pt;" border="1" cellpadding="2" cellspacing="0"><tr style="background-color:#cacaca; font-size:10pt;"><td>Cell</td><td>Formula</td></tr><tr><td>B1</td><td>=IF(ISERROR(MID($A1,LEN($A1)+COLUMN()-8,1)),"",MID($A1,LEN($A1)+COLUMN()-8,1))</td></tr></table></td></tr></table>
 
Upvote 0
Perhaps this formula would do. Put it in a row 1 cell and drag right 8 cells and down as far as needed.

=MID(RIGHT(TEXT($A1,REPT(" ",7)&0),7),COLUMN(A2),1)

(I would have used seven spaces explicitly instead of the REPT, but that wouldn't show clearly on the forum.)
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,854
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top