+ Reply to Thread
Results 1 to 15 of 15

Adjust spaces in cell

  1. #1
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Adjust spaces in cell

    Hello everyone

    In column F I have some data and the data in each cell is in two parts ..
    In the yellow cells the data are adjusted to look in neat format ..
    How can the spaces adjusted between the two parts to be like the yellow cells?

    Thanks advanced for help

    * The thread is posted at this link too
    http://www.eileenslounge.com/viewtopic.php?f=30&t=31478
    Attached Files Attached Files
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Adjust spaces in cell

    Hello YasserKhalil,

    See if this Post is of any help.

    Regards.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Adjust spaces in cell

    Thanks a lot Winon .. I have looked at the post but I don't know how to make use of that
    The trick point I think is how to calculate the column width and detect the number of characters that may be used ..

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Adjust spaces in cell

    Quote Originally Posted by YasserKhalil View Post
    The trick point I think is how to calculate the column width and detect the number of characters that may be used ..
    I don't think even that will give you the neat result you're looking without using a monospaced font such as 'Courier' to line everything up.

    You could easily write a sub that would loop through and adjust the number of spaces between the two sections of text in each cell and add enough spaces to normalise the layout, but you would need that font change for it to look right. Happy to help with that if you'd like.

    OR, you could simply split the column into two columns and do it that way...

    BSB

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Adjust spaces in cell

    Thanks a lot for reply .. I don't prefer to split the column
    And I will glad of your help as for the first approach
    Thank you very much

  6. #6
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Adjust spaces in cell

    This is my try till now but I got incorrect output
    Please Login or Register  to view this content.

  7. #7
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Adjust spaces in cell

    Maybe something like this?
    Please Login or Register  to view this content.
    BSB

  8. #8
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Adjust spaces in cell

    Thank you very much for this perfect solution
    So it is limited to this type of font .. we can't adjust it with the same font type 'Arial'?

  9. #9
    Valued Forum Contributor mohan.r1980's Avatar
    Join Date
    09-18-2010
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2010 (windows7)
    Posts
    729

    Re: Adjust spaces in cell

    Hi Yasser,

    a little help from me see its sutaible for you or not.

    Please Login or Register  to view this content.
    Regards,
    MohanS


    "Perfection is not attainable, but if we chase perfection we can catch excellence." - Vince Lombardi

    You can simply say thanks by clicking "*Add Reputation" icon

  10. #10
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Adjust spaces in cell

    You might be able to but would be difficult to get perfectly lined up every time.

    Not sure I'd want to sit and write that code as the benefit wouldn't be worth the effort I feel.

    BSB

  11. #11
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Adjust spaces in cell

    Thank you very much for replies
    I think the solution in post #7 is the most suitable
    Best Regards

  12. #12
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Adjust spaces in cell

    This will worked for non monospace font too.

    Please Login or Register  to view this content.
    This is my gift for you, Merry Christmas
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  13. #13
    Forum Contributor Axmed.cm's Avatar
    Join Date
    02-05-2015
    Location
    Somalia
    MS-Off Ver
    2013
    Posts
    231

    Re: Adjust spaces in cell

    Dear Khalil

    Hope your fine.

    You can write this formula in Column I and paste to column F

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Capture7.JPG

    Thanks
    Ahmed
    GUURE

  14. #14
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Adjust spaces in cell

    Thanks a lot Ahmed
    Thanks a lot the Legend Man and thanks a lot for this awesome gift
    Best Regards

  15. #15
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Adjust spaces in cell

    You are welcome, hope this can help.

    Regards

+ 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. [SOLVED] macro to adjust rounding value at random cell based on a cell value in another sheet
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-23-2018, 04:42 AM
  2. [SOLVED] How to adjust row height of row so tall the point to grab to adjust auto falls below
    By juntjoo in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 06-22-2016, 02:07 PM
  3. [SOLVED] Adjust Code to Sort by specific Cell characters found with cell
    By boldcode in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-15-2014, 02:34 PM
  4. [SOLVED] Auto Adjust Stacked Column Need to Adjust Legend
    By tbren in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 03-29-2013, 01:56 PM
  5. [SOLVED] Adjust Multiple Cell Borders Based on Cell Contents
    By USFishin in forum Excel General
    Replies: 16
    Last Post: 04-10-2012, 12:56 AM
  6. adjust logarithmic scale + adjust chart
    By voltaire101 in forum Excel General
    Replies: 5
    Last Post: 08-05-2010, 08:12 PM
  7. Replies: 1
    Last Post: 01-16-2009, 05:31 PM

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