+ Reply to Thread
Results 1 to 4 of 4

Using offset to convert one column to multiple rows when data is inconsistent - HELP!

  1. #1
    Registered User
    Join Date
    08-31-2019
    Location
    Melbourne, Australia
    MS-Off Ver
    MS Office Home & Student 2016
    Posts
    1

    Using offset to convert one column to multiple rows when data is inconsistent - HELP!

    Afternoon all,

    I have a data set that unfortunately is one long column that I am trying to convert into usable data into multiple rows.
    I have been using the formula;

    =OFFSET($A$1,COLUMNS($A1:A1)-1+(ROWS($1:1)-1)*9,0)

    However the data is inconsistent - Sometimes there are 9 elements before the next set, sometimes 8.
    An example;

    Sometimes the pattern will be; Name/Date/Time etc
    the next pattern will be; Name/Time etc

    So hence the formula above gets confused (almost as much as the user!)

    Is there any way to use a dynamic formula? - The data is very simple and consistent! Attached if there are any legends out there who can help!!

    Thanks all!!
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,698

    Re: Using offset to convert one column to multiple rows when data is inconsistent - HELP!

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    (Note: this requirement is not optional. As you are new here, I will do it for you this time: https://www.mrexcel.com/board/thread...-help.1203949/)
    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
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,829

    Re: Using offset to convert one column to multiple rows when data is inconsistent - HELP!

    You need to be able to determine where each variable-range record begins. I haven't looked through every one of the 26,000+ cells, but it does seem as if you only have only three names for each record, i.e. Matthew H, MD and Gatesy, and so you could identify those by first inserting a blank row at the top of the file and then using this formula in B2:

    =IF(OR(A2="Matthew H",A2="MD",A2="Gatesy"),MAX(B$1:B1)+1,"")

    When you copy that down it will give you a simple sequence identifying the start of each record, although I would suggest this amendment:

    =IF(OR(A2="Matthew H",A2="MD",A2="Gatesy"),(INT(MAX(B$1:B1)/100)+1)*100,"")

    This will give a sequence of 100, 200, 300 etc., which will give you an opportunity to replace the "" with other expressions to try to identify the type of field. For example, it looks like the name is followed by a date (this can be 01 added on to the record number), then a time (02), then the words Bet Stake or Won (03), then an address (04), and so on.

    It would then be quite straightforward to extract the appropriate fields in another part of the sheet using an INDEX/MATCH formula in conjunction with ROWS (*100) and COLUMNS.

    Hope this helps.

    Pete

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,408

    Re: Using offset to convert one column to multiple rows when data is inconsistent - HELP!

    Please Login or Register  to view this content.
    This ???
    Attached Files Attached Files
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. i need to convert multiple rows into single column
    By mmans786 in forum Excel General
    Replies: 3
    Last Post: 08-08-2015, 12:02 PM
  2. [SOLVED] VBA to convert data in corresponding column to multiple rows
    By alexxgalaxy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-12-2013, 07:20 PM
  3. Replies: 4
    Last Post: 03-08-2013, 09:49 AM
  4. [SOLVED] Multiple Rows with inconsistent structure into One Row without use of macros
    By brianhfield in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-16-2012, 08:32 PM
  5. Replies: 0
    Last Post: 09-26-2012, 10:33 AM
  6. Convert multiple rows to one single column
    By Rashme in forum Excel General
    Replies: 2
    Last Post: 09-12-2012, 03:20 PM
  7. How can I convert a data from multiple rows into 1 column?
    By yudi_lks in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-30-2005, 12:07 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