+ Reply to Thread
Results 1 to 8 of 8

Writting number from columns in reversed order

  1. #1
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    Writting number from columns in reversed order

    I have this situation:

    Please Login or Register  to view this content.
    I need to write them in one cell in reversed order (C0G8) without zero in front.

    number of columns is up to 28.
    Last edited by zbor; 05-16-2009 at 11:26 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Writting number from columns in reversed order

    One way though not elegant:

    =RIGHT(R1&Q1&P1&O1&N1&M1&L1&K1&J1&I1&H1&G1&F1&E1&D1&C1&B1&A1,MAX(IF(A1:R1<>0,COLUMN(A1:R1))))
    committed with CTRL + SHIFT + ENTER

    Non-Array version:

    =RIGHT(R1&Q1&P1&O1&N1&M1&L1&K1&J1&I1&H1&G1&F1&E1&D1&C1&B1&A1,LOOKUP(2,1/(A1:R1<>0),COLUMN(A1:R1)))
    Last edited by DonkeyOte; 05-16-2009 at 11:18 AM.

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    Re: Writting number from columns in reversed order

    base.xlsx

    Hmmm... would be easier to calculate columns in revers order...

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Writting number from columns in reversed order

    I'm not sure I follow, so this:

    Please Login or Register  to view this content.
    does not work ?

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Writting number from columns in reversed order

    On an aside - if you went with morefunc.xll you could use MCONCAT / TXTREVERSE, ie:

    C5:
    =RIGHT(TEXTREVERSE(MCONCAT(D5:AE5)),LOOKUP(2,1/(D5:AE5<>0),COLUMN(D5:AE5)-3))

    or

    =TEXTREVERSE(MCONCAT(D5:INDEX(D5:AE5,LOOKUP(2,1/(D5:AE5<>0),COLUMN(D5:AE5)-3))))

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    Re: Writting number from columns in reversed order

    I've tryed second formula and it works. Thanks.
    Just needed som time to type it

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Writting number from columns in reversed order

    You could use a function to do the base conversion:
    Please Login or Register  to view this content.
    For example,

    =Dec2Base(2^31-1, 2) = 1111111111111111111111111111111
    =Dec2Base(2^31-1, 16) = 7FFFFFFF
    =Dec2Base(2^31-1, 36) = ZIK0ZJ
    Last edited by shg; 05-16-2009 at 11:51 AM.
    Entia non sunt multiplicanda sine necessitate

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Writting number from columns in reversed order

    Or you could modify the formula in D5 (and copied across and down) to make the numbers come out in the right order:

    =LOOKUP( MOD(INT($C$1 / $B5 ^ (28 - COLUMN(A1) ) ),$B5 ), $B$3:$B$38)

+ 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