+ Reply to Thread
Results 1 to 21 of 21

Align Columns

  1. #1
    Registered User
    Join Date
    02-03-2017
    Location
    ENGLAND
    MS-Off Ver
    EXCEL 2013
    Posts
    15

    Smile Align Columns

    Hi
    I would like to align columns B, C and D with column A. column A needs to remain in the order it is in and column B needs to change to match A.
    This should help me identify which one is missing as column B is missing data and also help with copy and paste into the original file.
    Can anyone suggest a straightforward way to do this?
    Thanks, Kristina
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,339

    Re: Align Columns

    Are the items unique or duplicated?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    02-03-2017
    Location
    ENGLAND
    MS-Off Ver
    EXCEL 2013
    Posts
    15

    Re: Align Columns

    Hi
    The items in column A are the same as the ones in B but they are not aligned.. i need the data in B, C and D to align to column A
    Thanks

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,339

    Re: Align Columns

    That is not what I asked: I asked if the values in each column were unique. Can you attach a sample workbook?

    EDIT: Ooops! Just seen the attachment. Will take a look.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,339

    Re: Align Columns

    So, the data in B, C and D is already correctly aligned - is this the case?

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,339

    Re: Align Columns

    Try this (copy all formulae down):

    Excel 2016 (Windows) 32 bit
    F
    G
    H
    I
    3
    =A3 =IFERROR(VLOOKUP($F3,$B$3:$D$163,COLUMNS($G:G),0),"") =IFERROR(VLOOKUP($F3,$B$3:$D$163,COLUMNS($G:H),0),"")
    =IFERROR(VLOOKUP($F3,$B$3:$D$163,COLUMNS($G:I),0),"")
    Sheet: Sheet1

  7. #7
    Registered User
    Join Date
    02-03-2017
    Location
    ENGLAND
    MS-Off Ver
    EXCEL 2013
    Posts
    15

    Re: Align Columns

    Yes the data in BCD is already aligned

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,339

    Re: Align Columns

    Have you tried my suggestion?

  9. #9
    Registered User
    Join Date
    02-03-2017
    Location
    ENGLAND
    MS-Off Ver
    EXCEL 2013
    Posts
    15

    Re: Align Columns

    Yes, it does not work for me

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,339

    Re: Align Columns

    In what way does it "not work" for you? Please be explicit.

  11. #11
    Registered User
    Join Date
    02-03-2017
    Location
    ENGLAND
    MS-Off Ver
    EXCEL 2013
    Posts
    15

    Re: Align Columns

    When i paste the formula in as above in F, G H and I - Column F replicates A3 but the other columns appear blank. The formula is there but nothing is showing up

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,339

    Re: Align Columns

    It is working for me - see the attached file.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    02-03-2017
    Location
    ENGLAND
    MS-Off Ver
    EXCEL 2013
    Posts
    15

    Re: Align Columns

    Thanks, I can see it has worked on your version however there are too many gaps, it looks like there should be only one gap here.

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,339

    Re: Align Columns

    That's because there are no matches for those numbers. There are trailing spaces in column B that you will need to deal with.

  15. #15
    Registered User
    Join Date
    02-03-2017
    Location
    ENGLAND
    MS-Off Ver
    EXCEL 2013
    Posts
    15

    Re: Align Columns

    For example i can see that for 6040.2322 there is a match but it is not picking it up - I can't understand why some are recognised and not others

  16. #16
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,339

    Re: Align Columns

    I have explained why above (post #14) - it's not an exact match. Find 6040.2322 in column B and place your cursor in that cell - do you see the trailing space after the number? Delete the trailing space - is there now a match in my table on the right? Yes - that's because you have deleted the trailing space. You need to get rid of those trailing spaces.

  17. #17
    Registered User
    Join Date
    02-03-2017
    Location
    ENGLAND
    MS-Off Ver
    EXCEL 2013
    Posts
    15

    Re: Align Columns

    Perfect! thank you for explaining!

  18. #18
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,339

    Re: Align Columns

    Do you want a quick fix idea?

  19. #19
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,339

    Re: Align Columns

    Here it is anyway!

    In K3 copied down:

    =LEFT(B3,9)

    Now copy and paste values from column K over the values in column B. All done.

  20. #20
    Registered User
    Join Date
    02-03-2017
    Location
    ENGLAND
    MS-Off Ver
    EXCEL 2013
    Posts
    15

    Re: Align Columns

    Ah good quick fix, i used the =TRIM function (after a quick google) thank you for your help today!

  21. #21
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,339

    Re: Align Columns

    You're welcome.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. How to align columns
    By eyedoc in forum Excel General
    Replies: 8
    Last Post: 11-22-2014, 03:27 PM
  2. [SOLVED] Align 3 columns with 2 columns of matching data
    By loritee in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-23-2013, 10:36 AM
  3. Align 3 columns with 2 columns of matching data
    By bearnbillie in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-04-2012, 08:33 AM
  4. Formula to align two columns with nearly similar text and attached numeric columns
    By Benefits Recon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-27-2012, 12:03 AM
  5. align columns ?
    By pjcornejo in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-23-2009, 06:11 PM
  6. right align columns
    By stermann in forum Excel General
    Replies: 2
    Last Post: 08-15-2007, 06:05 AM
  7. How to align entries in columns so other columns will follow ?
    By Artur in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-07-2005, 04:15 AM

Tags for this Thread

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