+ Reply to Thread
Results 1 to 15 of 15

Names not aligning left while ($) values are aligning right in one cell

  1. #1
    Registered User
    Join Date
    07-01-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    44

    Names not aligning left while ($) values are aligning right in one cell

    Hi all

    I have created a dropdown box which shows names and a dollar value which is drawn from cells elsewhere with a long winded formula, my problem is that while all the names align to the left of the dropdown box all the dollar values are all over the place because of all the different lengths of the names, what I want to happen is when I choose a player (name) the name should appear in the cell aligning to the left and the Dollar value of that player should align to the right of the cell, I have tried highlighting the column - right clicking - format cell then choosing the alignment tab - in Horizontal choose Distributed (indent) that aligns all the dollar values to the right but then the names have moved, I am at a loss as to how to fix it.

    I look forward to any replies
    if you need to know anything else please just ask


    Mike

    Excel I am using is 2007

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Names not aligning left while ($) values are aligning right in one cell

    Hi,

    Can you post a small sample?

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Names not aligning left while ($) values are aligning right in one cell

    Mike

    How did you create the dropdown?

    If it was an ActiveX combobox (or listbox) then you could set it to have 2 columns, one for name and one fo $.
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    07-01-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    44

    Re: Names not aligning left while ($) values are aligning right in one cell

    I created the dropdown box through Data Validation, I did it this way so the cell did not show an arrow until you clicked in the cell

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Names not aligning left while ($) values are aligning right in one cell

    Do you need both the name and $ in the dropdown?

    Couldn't you just have the name and in the adjacent cell a formula to look up/calculate the $?

  6. #6
    Registered User
    Join Date
    07-01-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    44

    Re: Names not aligning left while ($) values are aligning right in one cell

    I have attached a small sample so you can see the result when a player is chosen, as you can see the dollar value is not aligned to the right, I created the dropdown box through Data Validation

    I hope you can see the attachment, as I am new to all this I'm not sure I have attached it properly

    Cheers
    Mike
    Attached Files Attached Files

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Names not aligning left while ($) values are aligning right in one cell

    missing source data in column ac
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  8. #8
    Registered User
    Join Date
    07-01-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    44

    Re: Names not aligning left while ($) values are aligning right in one cell

    I would prefer the $ as well, I have a number of cells next to it already with different formulas to tell me different things

    Cheers Norie

    Mike

  9. #9
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Names not aligning left while ($) values are aligning right in one cell

    I think Martin means that you've forgotten to include the source data for your data validation in the attachment.

    Regards

  10. #10
    Registered User
    Join Date
    07-01-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    44

    Re: Names not aligning left while ($) values are aligning right in one cell

    Hi Martin
    tried to upload full spreadsheet but didn't work, I presume its too big, tried to delete certain parts but then source data disappeared. Don't know what else to do.

    Mike

  11. #11
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Names not aligning left while ($) values are aligning right in one cell

    Mike

    Surely having the $ in another column would be better than having it in the dropdown.

    If it's in the dropdown it's going to be pretty difficult to do any calculations with it.

    Also, it's not as if you don't have room - column B is about 6 times as wide as the other columns.

  12. #12
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Names not aligning left while ($) values are aligning right in one cell

    have you tried zipping it?

  13. #13
    Registered User
    Join Date
    07-01-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    44

    Re: Names not aligning left while ($) values are aligning right in one cell

    Just zipped it up so you see the file now

    cheers
    Mike
    Attached Files Attached Files

  14. #14
    Forum Contributor
    Join Date
    04-13-2010
    Location
    England
    MS-Off Ver
    Office 2016 365
    Posts
    211

    Re: Names not aligning left while ($) values are aligning right in one cell

    I was trying the same method as you as it turns out, trying to force the string into a fixed length based on the max of the longest name and having constituent parts start at a fixed point in the string but to no avail.

  15. #15
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Names not aligning left while ($) values are aligning right in one cell

    it wont work because len() is just the count of characters but different characters are different widths! all these are 47 characters long
    kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkx
    llllllllllllllllllllllllllllllllllllllllllllllx
    mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmx

    I'm with Norrie put it in another column.
    incidentally you get circular reference warnings not sure why

    and an over use of parenthesis it could just be
    =IF(C6="","",VLOOKUP(C6,V:AA,6,FALSE)) doesn't affect things but .......

+ 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. Replies: 5
    Last Post: 12-10-2012, 02:15 PM
  2. Left-aligning certain cells not working??
    By WorldBuilder in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-15-2012, 11:39 AM
  3. How to left aligning text in chart (from centered)
    By PhillyT in forum Excel General
    Replies: 2
    Last Post: 01-16-2012, 09:22 AM
  4. Aligning text to the right and left on same line
    By bluerog in forum Word Formatting & General
    Replies: 3
    Last Post: 04-21-2010, 04:49 PM
  5. [SOLVED] Aligning decimal numers to the centre of the cell and aligning dec
    By Ramesh Babu in forum Excel General
    Replies: 1
    Last Post: 07-01-2006, 05:40 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