+ Reply to Thread
Results 1 to 3 of 3

Combination of left and right justification in a cell?

  1. #1
    John Keith
    Guest

    Combination of left and right justification in a cell?

    Is there a way to combine two cells in to a third cell such that the first
    cell's value is left justified and the 2nd cell's value is right justified.
    Like a left-tab and a right-tab would do in word.

    A1 = "Coffee" {which is left justified in the cell}
    B1 = "1010" {which is right Justified in the cell}
    C1 = "Coffee 1010" {which does not
    have the physical spaces added, this should be controlled by auto-fit in the
    cell based on the data in the entire column-C} Of course I could use fixed
    font and always make the cell have 50 characters for example... but I want
    this to work with proportional fonts.

    Something like... =LeftJust(A1)&RightJust(B1) -or-
    =A1&RTabChar&B1

    Maybe a VBA function that plops the text into a cell and autofits then
    calculates the width then iterates thought adding a space and recalculating
    the width until the needed width is reached. This method still has problems
    because proportional fonts spacing will not come out exact across multiple
    strings of text.

    Verbose - I know but there has to be a better way. (I know this square peg
    WILL fit in that round hole)

    --
    Regards,
    John

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481
    Quote Originally Posted by John Keith
    A1 = "Coffee" {which is left justified in the cell}
    B1 = "1010" {which is right Justified in the cell}
    C1 = "Coffee 1010" {which does not
    have the physical spaces added, this should be controlled by auto-fit in the
    cell based on the data in the entire column-C} Of course I could use fixed
    font and always make the cell have 50 characters for example... but I want
    this to work with proportional fonts.

    Something like... =LeftJust(A1)&RightJust(B1) -or-
    =A1&RTabChar&B1

    John
    =A1&" "&B1
    something like this?

  3. #3
    Tim Williams
    Guest

    Re: Combination of left and right justification in a cell?

    You could always format two adjacent columns to appear as though they are a single column....
    Otherwise I'm not sure there's any way to mix two different types of alignments in a single cell.

    What's the purpose?

    Tim

    "John Keith" <[email protected]> wrote in message news:[email protected]...
    > Is there a way to combine two cells in to a third cell such that the first
    > cell's value is left justified and the 2nd cell's value is right justified.
    > Like a left-tab and a right-tab would do in word.
    >
    > A1 = "Coffee" {which is left justified in the cell}
    > B1 = "1010" {which is right Justified in the cell}
    > C1 = "Coffee 1010" {which does not
    > have the physical spaces added, this should be controlled by auto-fit in the
    > cell based on the data in the entire column-C} Of course I could use fixed
    > font and always make the cell have 50 characters for example... but I want
    > this to work with proportional fonts.
    >
    > Something like... =LeftJust(A1)&RightJust(B1) -or-
    > =A1&RTabChar&B1
    >
    > Maybe a VBA function that plops the text into a cell and autofits then
    > calculates the width then iterates thought adding a space and recalculating
    > the width until the needed width is reached. This method still has problems
    > because proportional fonts spacing will not come out exact across multiple
    > strings of text.
    >
    > Verbose - I know but there has to be a better way. (I know this square peg
    > WILL fit in that round hole)
    >
    > --
    > Regards,
    > John




+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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