+ Reply to Thread
Results 1 to 7 of 7

Rectify wrong alignment

  1. #1
    Forum Contributor
    Join Date
    08-04-2013
    Location
    Bucharest
    MS-Off Ver
    Office Professional Plus 2019
    Posts
    303

    Rectify wrong alignment

    Hello, I've made a mistake when writing a formula, I added a space where I shouldn't have and now all the results skewed.
    As you can see in the example, the L column is out of alignment, some cells have a space before the digits, some don't.
    I tried to fix it by formatting but it won't work.. obviously.
    I was thinking of a formula where
    IF L2 contains ("2-0", then "2-0", if not, if it contains "2-1", then "2-1", and so on with nested ifs. but I don't know what formula to use.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,893

    Re: Rectify wrong alignment

    Just highlight column L, then CTRL-H (Find & Replace):

    Find what: <space>
    Replace wth: leave blank
    Click Replace All.

    Hope this helps.

    Pete

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,972

    Re: Rectify wrong alignment

    If that doesnt work, try this in a helper, copied down...
    =IF(L2="","",MID(L2,LEN(L2)-2,99))

    What formula was used to produce those results in teh 1st place? could you not just re-run it again?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Contributor
    Join Date
    08-04-2013
    Location
    Bucharest
    MS-Off Ver
    Office Professional Plus 2019
    Posts
    303

    Re: Rectify wrong alignment

    Thanks, this is just what I needed, but when I click "replace all" it replaces every space in the sheet, no just the L column, the L column is highlighted, I don t know what I'm doing wrong

    EDIT: Solved using Ford's formula, many thanks!
    No, I couldn't re-run it, can't find a proper way to explain, sorry.
    Last edited by bibu; 03-16-2014 at 07:03 PM.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,972

    Re: Rectify wrong alignment

    Happy to help and thanks for the feedback

  6. #6
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: Rectify wrong alignment

    Hi bibu,

    I gave you some help on an earlier post a few days ago, and I was interested in what you are doing.

    This may be of no use to you, but I became challenged, so thought I'd try something different!



    In the attached workbook, I have taken the two books you sent me, and devised a macro which reads through the scores, and gives you the result from the selected players perspective. Same as Col L, but for now, it is in Col O (so that you can see they're the same). Just press the Sets Score button.

    In this solution, you don't have to worry about the matches that don't involve the selected player, the macro returns a blank.

    I have also had the macro spit out 1st set wins, Match wins and number of sets played.

    On the Analysis sheet, you can see many of the results you are after, and you can choose which surface you are looking at. I'm not sure what you are looking for in row 11, but I suspect there is enough information on the Results sheet.

    One other thing, there is a macro button to Remove Duplicates. It looks at the first four columns and removes duplications based on names, tournament and date.

    COMMENTS:
    1. I note that matches which end due to retirement are ignored. I assume this is because there is no indication of who retired!
    2. Males playing in majors play 5 sets. The Analysis sheet doesn't allow for this - how would you deal with that?

    Anyway - good luck with it! Will be interested if this is of any use!


    When you reply please make it clear WHO you are responding to by mentioning their name.

    If this has been of assistance, please advise. A little thanks goes a long way.
    - Please click on the *Add Reputation button at the bottom of helpful responses.

    Please mark your thread as SOLVED:
    - Click Thread Tools above your first post, select "Mark your thread as Solved".
    Last edited by zbor; 03-18-2014 at 07:35 AM. Reason: attached file deleted on bibu request

  7. #7
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: Rectify wrong alignment

    Further to my message earlier today.

    David
    Last edited by zbor; 03-18-2014 at 07:35 AM. Reason: attached file deleted on bibu request

+ 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. Wrong coding or RANDBETWEEN is wrong?
    By zbor in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 07-31-2013, 10:01 AM
  2. [SOLVED] Stock Report- help me to rectify the error
    By excuseme in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 03-17-2013, 04:47 PM
  3. Replies: 1
    Last Post: 02-02-2012, 11:32 AM
  4. Attendance Sheet Formula not working, please rectify it.
    By NonStopLeo in forum Excel General
    Replies: 9
    Last Post: 03-24-2010, 08:02 AM
  5. query wizard has stopped working how do i rectify this
    By Marie LND in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-18-2005, 10:06 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