+ Reply to Thread
Results 1 to 15 of 15

Skip one row when value changes in another column

  1. #1
    Registered User
    Join Date
    06-21-2023
    Location
    US
    MS-Off Ver
    365
    Posts
    19

    Question Skip one row when value changes in another column

    Hi!

    I have two columns: the first one defines the type and the second one that has values in it.

    Once the type changes its value (from 1 to 2, for instance), I need to skip one row in the second column.

    I hope the example will make things clear:

    sample.xlsx

  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
    80,973

    Re: Skip one row when value changes in another column

    Unclear (to me).

    AliGW on MS365 Beta Channel (Windows 11) 64 bit

    B
    C
    D
    E
    F
    12
    1
    0
    13
    1
    0
    14
    2
    Skip here
    15
    2
    0
    16
    2
    0
    17
    3
    0
    Why no skip here?
    18
    19
    0
    Sheet: ?????1

    You cannot move manually entered data with a formula - this will probably need VBA.
    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
    06-21-2023
    Location
    US
    MS-Off Ver
    365
    Posts
    19

    Re: Skip one row when value changes in another column

    There are two of "1", then three of "2" and one of "3", so skips are after two, three and one of 0's.
    Last edited by AliGW; 07-03-2023 at 07:44 AM. Reason: Please do NOT quote unnecessarily!

  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
    80,973

    Re: Skip one row when value changes in another column

    Clear as mud - sorry! Someone will get it, but it can't be done with a formula if those 0s are already in place. Please confirm that they have been entered manually and not using a formula.

  5. #5
    Registered User
    Join Date
    06-21-2023
    Location
    US
    MS-Off Ver
    365
    Posts
    19

    Re: Skip one row when value changes in another column

    0's are entered manually
    Last edited by AliGW; 07-03-2023 at 07:55 AM. Reason: Please do NOT quote unnecessarily!

  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
    80,973

    Re: Skip one row when value changes in another column

    That's a shame. This would have generated them for you:

    =LET(u,UNIQUE(B3:B8),c,COUNTIF(B3:B8,u),DROP(TEXTSPLIT(TEXTJOIN(" ",,REPT(0&" ",c)),," "),-1))

    I shall move the thread to the VBA section, as it can't be done with a formula.

    PLEASE don't quote unnecessarily! It's just clutter.

  7. #7
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: Skip one row when value changes in another column

    please try
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  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
    80,973

    Re: Skip one row when value changes in another column

    @Hans - the problem is that the OP wants the manually entered data to move, so a formula won't suit. This has been moved to the VBA section.

  9. #9
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: Skip one row when value changes in another column

    My formula does pick up the manually entered data and reorganize it, in the way requested.

  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
    80,973

    Re: Skip one row when value changes in another column

    But that's not what is required as far as I now understand it - the original manually entered data needs to be rearranged. Both your formula and mine produce results in a different column.

  11. #11
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: Skip one row when value changes in another column

    @Ali, The difference between your formula and my formula is that your formula does not use the manually entered data and always produces zeros and empty cells and
    my formula does use the manually entered data and produces the same data with empty cells in between.

  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
    80,973

    Re: Skip one row when value changes in another column

    I am aware of that, but neither formula moves the manually created data!

    Neither you nor I have provided a solution to the problem. That's why it's now in the VBA section - can't be done with a formula.

  13. #13
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: Skip one row when value changes in another column

    neither formula moves the manually created data
    My formula does put the manually entered data in a different place.

    I look forward to the OP's response.

  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
    80,973

    Re: Skip one row when value changes in another column

    Sigh! Yes, I know it does.

    I look forward to the OP's response, too, but I still think he wants the manually entered data to move, not be copied and rearranged elsewhere.

  15. #15
    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
    80,973

    Re: Skip one row when value changes in another column

    Suggestions seen, but no response ...

    Some feedback would be appreciated.

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

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

+ 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. Autofill down a column using another sheet row data and skip one column each time
    By JohnPollardMDD in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-18-2019, 07:57 PM
  2. If cell in Column G = X then fill 123 in Column H (and skip already filled cells)
    By MP1286 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2016, 01:14 PM
  3. skip every 10 column
    By melavi in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 04-20-2016, 11:22 AM
  4. Replies: 4
    Last Post: 09-23-2013, 06:19 PM
  5. [SOLVED] drag down rows that match column in different sheet, but skip every 3 cells in column
    By mbkr29 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-23-2013, 01:43 PM
  6. Excel 2007 : sum & and skip a column...
    By gill389 in forum Excel General
    Replies: 1
    Last Post: 03-01-2011, 02:14 PM
  7. Skip Column
    By C_Cruz in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-08-2008, 07:51 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