+ Reply to Thread
Results 1 to 6 of 6

Substring diagonal split

  1. #1
    Registered User
    Join Date
    04-28-2015
    Location
    U.S.
    MS-Off Ver
    2007
    Posts
    41

    Substring diagonal split

    Hello everyone,

    is there a vba code for character substring, to seperate diagonally in each cell.

    Example:

    123456789
    ...... 1
    ....... 2
    ........ 3
    .........4 ....................G
    ......... 5 ..................F
    .......... 6 ................ E
    ............7 ............D
    ............8 ...........C
    ..............9 .....B
    ...................A
    ABCDEFG


    Could the code be used up and down on the spreadsheet.
    Thanks for any assistance.
    Attached Files Attached Files
    Last edited by Daddy007; 06-15-2015 at 09:50 PM.

  2. #2
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,412

    Re: Substring diagonal split

    Hello,
    Can you post a sample workbook showing the expected result you want?
    Or please provide more details. I read 3 times and I'm not sure to understand what you want.
    GC Excel

    If this post helps, then click the star icon (*) in the bottom left-hand corner of my post to Add reputation.

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    15,879

    Re: Substring diagonal split

    Hi Daddy007,

    See if the attached is what you are looking for. The dollar sign in the rows or columns range holds it constant and as the formula moves the number increases. The Mid formula does the rest.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Forum Guru mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,224

    Re: Substring diagonal split

    You might be interested in these.
    The UDF CharacterArray returns an array of the characters of a given string, arranged according to the Direction argument.
    In the attached, H2:P10 hold the array formula {=CharacterArray(E2,F2)}

    There is also the sub, WriteToCells which will write the characters in a string, starting at a given cell and going in the direction indicated. The button demonstrates this with the string "see this", starting at AJ10 in the direction from cell F2.

    Direction arguments for both these procedures require one of the values R L U D RU RD LR LU
    The Direction argument is optional and defaults to R

    Please Login or Register  to view this content.
    Attached Files Attached Files
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  5. #5
    Forum Guru
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,877

    Re: Substring diagonal split

    Hi Y,

    Please Login or Register  to view this content.

    Regards

  6. #6
    Registered User
    Join Date
    04-28-2015
    Location
    U.S.
    MS-Off Ver
    2007
    Posts
    41

    Re: Substring diagonal split

    WoW! This code is great!

    This can get the task done, wonderfully coded, thanks a great deal.

+ 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. diagonal split cell in excel
    By kisanvikas2015 in forum Excel General
    Replies: 1
    Last Post: 06-09-2015, 10:04 PM
  2. Search substring within range, report the substring found
    By Brooke1578 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-20-2012, 03:56 PM
  3. [SOLVED] Diagonal between cells
    By CarltonOB in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 06-24-2012, 08:16 AM
  4. [SOLVED] Extract Substring, then Ignore that Substring, while collecting data from Other substrings
    By Sameki121 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-17-2012, 05:21 PM
  5. Replies: 3
    Last Post: 07-20-2006, 04:35 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