+ Reply to Thread
Results 1 to 5 of 5

Trying to eliminate space between cells

  1. #1
    Registered User
    Join Date
    10-07-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1

    Trying to eliminate space between cells

    Here is my issue. I have columns that look something like this:

    -0.1134*
    1.2203
    8.3131***
    ...

    I want to align the decimal points, and I want to reduce the decimal places to 3. This is of course a problem because the numbers with the asterisks are read as text, not numbers. And yes, I need the asterisks to be attached to the numbers.

    My attempt at a workaround was to split the data into two columns, one with just the numbers and the second with any asterisks, i.e.

    -0.1134 *
    1.12203
    8.3131 ***
    ...

    and so forth. Then, my plan was to write a cell format for the numbers which looks like this: 0.?00;-0.?00;0.000;@ and align that cell right, align the asterisks to the left, and it should work. I've done similar things making tables in html, where this strategy has worked. Unfortunately, excel automatically pads all cells so I can't get the asterisks to butt up against the numbers. How can I get the formatted outcome I am looking for?

  2. #2
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Trying to eliminate space between cells

    maybe you should issue a value() on those numbers.

    value(A1)
    A1 has the -0.1134
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  3. #3
    Registered User
    Join Date
    03-07-2013
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Trying to eliminate space between cells

    Assuming these are in A1-A3:

    -0.1134*
    1.2203
    8.3131***

    I filled this down from B1-B3:

    =CONCATENATE(IF(LEN(RIGHT(ROUND(IFERROR(LEFT(A1,FIND("*",A1,1)-1)*1,A1*1),3),LEN(ROUND(IFERROR(LEFT(A1,FIND("*",A1,1)-1)*1,A1*1),3))-FIND(".",ROUND(IFERROR(LEFT(A1,FIND("*",A1,1)-1)*1,A1*1),3),1)))=2,CONCATENATE(ROUND(IFERROR(LEFT(A1,FIND("*",A1,1)-1)*1,A1*1),3),0),ROUND(IFERROR(LEFT(A1,FIND("*",A1,1)-1)*1,A1*1),3)),IFERROR(RIGHT(A1,(LEN(A1)-FIND("*",A1,1)+1)),""))

    To get this:

    -0.113*
    1.220
    8.313***


    Is that what you were looking

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Trying to eliminate space between cells

    TRY THIS FORMULA, I assumed that your data is in A1
    =TEXT(LEFT(A1,IFERROR(FIND("*",A1)-1,LEN(A1))),"0.000")&MID(A1,IFERROR(FIND("*",A1),LEN(A1)+1),256)

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Trying to eliminate space between cells

    Or

    Try this...

    =TEXT(SUBSTITUTE(A1,"*",""),"0.000")&IF(ISNUMBER(FIND("*",A1)),MID(A1,FIND("*",A1),255),"")


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Eliminate cells
    By TORINO7 in forum Excel General
    Replies: 4
    Last Post: 03-09-2011, 08:47 AM
  2. Eliminate cells
    By mqdias in forum Excel General
    Replies: 4
    Last Post: 10-11-2007, 10:04 AM
  3. Replies: 2
    Last Post: 08-15-2006, 12:55 PM
  4. Macro to eliminate extra space
    By kleivakat in forum Excel General
    Replies: 3
    Last Post: 01-31-2006, 08:25 AM
  5. [SOLVED] Too much white space to the right of a pie chart! How to eliminate
    By wstu in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 10-02-2005, 04:01 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1