+ Reply to Thread
Results 1 to 30 of 30

Drag cells and go every 2 cells+1

  1. #1
    Registered User
    Join Date
    01-12-2023
    Location
    Germany
    MS-Off Ver
    2022
    Posts
    13

    Drag cells and go every 2 cells+1

    Hello everyone!

    on the screenshot I posted you can see two different rows of digits. The second row is connected to the 1 row but not 1:1. The first to cells of the second row get the digit from the first cell of the first row. Cell 3 and 4 of the second row get the second cell of the first row and so on...

    My question is now, how can I modify the formula to drag the cells for Auto fill.


    Thank you and have a nice day





    Screenshot 2023-01-12 084445.png

  2. #2
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,003

    Re: Drag cells and go every 2 cells+1

    Try this,

    K7
    Please Login or Register  to view this content.
    copied right

  3. #3
    Registered User
    Join Date
    01-12-2023
    Location
    Germany
    MS-Off Ver
    2022
    Posts
    13

    Re: Drag cells and go every 2 cells+1

    Hey,
    Thank you very much. Its working so far!

    But I have an additional question:

    How would the formula look like if the upper data row would start at column "M" for example?

    Thank you very much, you already helped a lot!

    Best wishes

  4. #4
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,003

    Re: Drag cells and go every 2 cells+1

    Use M instead of K

    M7
    Please Login or Register  to view this content.
    copied right

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Drag cells and go every 2 cells+1

    In K6 then copied across. Data can start from any cell, formula remains same. It gives correct result.

    =IFERROR(INDEX($K$5:$Y$5,AGGREGATE(15,6,COLUMN($K$5:$Y$5)/($K$5:$Y$5<>""),1+INT((COLUMNS($K$6:K$6)-1)/2))-COLUMN($J$5)),"")
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  6. #6
    Registered User
    Join Date
    06-02-2020
    Location
    Turkey
    MS-Off Ver
    365 TR - V.2309
    Posts
    97

    Re: Drag cells and go every 2 cells+1

    Hi,

    as an alternative solution,

    with formula Excel 365 (with the use of EXPAND and TOROW functions)

    =TOROW(IFNA(EXPAND(K5:Z5,2),K5:Z5),,1)

    where, 2 is Nb cells
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-12-2023
    Location
    Germany
    MS-Off Ver
    2022
    Posts
    13

    Re: Drag cells and go every 2 cells+1

    Hey again,
    thank you very much for your solutions, it already helped alot!

    But I have third and last question: What do I have to do, if i want to pull 2 Cells which each go +1 after every second cell?

    Have a nice day!

    Greetings Marco

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

    Re: Drag cells and go every 2 cells+1

    Please show an example!

  9. #9
    Registered User
    Join Date
    01-12-2023
    Location
    Germany
    MS-Off Ver
    2022
    Posts
    13

    Re: Drag cells and go every 2 cells+1

    Imagine K an L from the second row highlighted have two different formulas in it, referring to the same cell. And I want to drag both drag and fill both cells at the same time, while counting each cells row only 1 up.

    Do you get the Point?

    Thanks!

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

    Re: Drag cells and go every 2 cells+1

    The problem with words that are not even my native language is that you can quickly interpret them in different ways.
    That's why I'd like to see an representative example, as you did in Post#1 with your input and expected results of the formula.

  11. #11
    Registered User
    Join Date
    01-12-2023
    Location
    Germany
    MS-Off Ver
    2022
    Posts
    13

    Re: Drag cells and go every 2 cells+1

    Attachment 813729

    Here We go, I want to drag and fill in this scheme

    Greetings

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

    Re: Drag cells and go every 2 cells+1

    One guess

    Input 5 - 12
    Output 5 - 12 - 6 - 13 - 7 -14 - 8 -15 - 9 -16 ....

    Did you mean this?

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

    Re: Drag cells and go every 2 cells+1

    Our posts were crossing.

    I can't douwnload your attachment (invalid attachment)

    Please add your attachment via Go advanced ... manage attachments (see yellow banner)

  14. #14
    Registered User
    Join Date
    01-12-2023
    Location
    Germany
    MS-Off Ver
    2022
    Posts
    13

    Re: Drag cells and go every 2 cells+1

    Does it work?
    Attached Images Attached Images

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

    Re: Drag cells and go every 2 cells+1

    One way:

    Please try in D6 and copy to right:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by HansDouwe; 01-17-2023 at 09:56 AM.

  16. #16
    Registered User
    Join Date
    01-12-2023
    Location
    Germany
    MS-Off Ver
    2022
    Posts
    13

    Re: Drag cells and go every 2 cells+1

    Works for me thanks!!!

    Going try to implement it to my excat table.

    Thank you

    marco

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

    Re: Drag cells and go every 2 cells+1

    Glad to hear that I was able to help you.
    If you have any further questions, don't hesitate to ask them here.

    Would you please consider adding reputation to the responses of all helpers that you feel have earned due to the help provided.
    If you want to, click on * Add reputation at the bottom left of the answer.

  18. #18
    Registered User
    Join Date
    01-12-2023
    Location
    Germany
    MS-Off Ver
    2022
    Posts
    13

    Re: Drag cells and go every 2 cells+1

    So I am a little bit confused when it comes to bringing this to my formula. Imagine having this formula in one cell instead of SUM(...):

    =SUMMEWENN(PZx_VSI!AU$6:AU$20000;"PZM"&$C9;PZx_VSI!$AJ$6:$AJ$20000)-SUMMEWENNS(PZx_VSI!$AJ$6:$AJ$20000;PZx_VSI!AU$6:AU$20000;"PZM"&$C9;PZx_VSI!$G$6:$G$20000;">"&HEUTE())

    And this in the second instead of Average(...)

    =SUMMEWENN(PZx_VSI!AU$6:AU$20000;"PZM"&$C9;PZx_VSI!$AJ$6:$AJ$20000)

    The Green highlighted columns shoulb be counted +1 as described before.

    Can you help me out here as well?

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

    Re: Drag cells and go every 2 cells+1

    Please add a small sample workbook with the same structure. See yellow banner at the top of the page.

  20. #20
    Registered User
    Join Date
    01-12-2023
    Location
    Germany
    MS-Off Ver
    2022
    Posts
    13

    Re: Drag cells and go every 2 cells+1

    Did adding the attachment work?

    Hope you will get the idea

    thanks
    Attached Files Attached Files

  21. #21
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Drag cells and go every 2 cells+1

    The attachment is there... but it has links to values in another file which we do not have access to. Please edit it and REPLACE it. Make it CLEAR what your expected answers are.
    Attached Images Attached Images
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  22. #22
    Registered User
    Join Date
    01-12-2023
    Location
    Germany
    MS-Off Ver
    2022
    Posts
    13

    Re: Drag cells and go every 2 cells+1

    Here we go
    Attached Files Attached Files

  23. #23
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Drag cells and go every 2 cells+1

    B5 copied down:
    =SUMIF(INDEX($E$12:$H$20,,MATCH(B$3,$E$11:$H$11,0)),"PZM"&$A5,$D$12:$D$20)-SUMIFS($D$12:$D$20,INDEX($E$12:$H$20,,MATCH(B$3,$E$11:$H$11,0)),"PZM"&$A5,$C$12:$C$20,">"&TODAY())

    C5 copied down:
    =SUMIF(INDEX($E$12:$H$20,,MATCH(B$3,$E$11:$H$11,0)),"PZM"&$A5,$D$12:$D$20)

    Select B5:C7. Drag across.
    Attached Files Attached Files

  24. #24
    Registered User
    Join Date
    01-12-2023
    Location
    Germany
    MS-Off Ver
    2022
    Posts
    13

    Re: Drag cells and go every 2 cells+1

    Thank you very much, I think I finally got it now!

    Greetings to Ireland!

  25. #25
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Drag cells and go every 2 cells+1

    You're welcome (currently in Thailand!!).



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please click on "Thread Tools" from the menu link (just above the first post in the thread) and mark this thread as SOLVED.

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

    Re: Drag cells and go every 2 cells+1

    In your case I would refer to the headers and not column numbers.
    I also find that easier to understand and easier to adapt when the rules change

    Please try in B5 and copy across and down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    In German:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  27. #27
    Registered User
    Join Date
    01-12-2023
    Location
    Germany
    MS-Off Ver
    2022
    Posts
    13

    Re: Drag cells and go every 2 cells+1

    As I already thought, it opened up another question for me because I dont really understand the logic of the functions you brought up to solve my problems.
    I attached a file and a screenshot, in this case I want the empty grey cells to be drag and filled arcodingly like the scheme shown before It should be like:

    Feb 23, Feb 23 (empty) Mar 23, Mar 23 (empty) Apr 23 Apr 23 (empty) May 23 May23 (empty) etc....

    Thank you very much!

    Screenshot 2023-01-19 115406.png
    Attached Files Attached Files

  28. #28
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Drag cells and go every 2 cells+1

    Who are you talking to?

    If me... then as per attached file (the original... as an empty sheet doesn't help too much...)

    Select the block of green cells and drag across.
    Attached Files Attached Files

  29. #29
    Registered User
    Join Date
    01-12-2023
    Location
    Germany
    MS-Off Ver
    2022
    Posts
    13

    Re: Drag cells and go every 2 cells+1

    Hello again,

    the File attached shouldt be empty I checked it. I want to fill the missing dates. I think we misunderstood eachother.

  30. #30
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Drag cells and go every 2 cells+1

    Ahhh. See new formulae in F4 & G4. Select F4 to H4 and drag across.
    Attached Files Attached Files

+ 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. [SOLVED] how to drag a row data to next cells
    By tushjain00 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 08-18-2019, 07:19 AM
  2. cells wont drag across
    By Tlarkin in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-05-2018, 05:26 AM
  3. Replies: 0
    Last Post: 02-04-2013, 03:25 PM
  4. Replies: 5
    Last Post: 11-28-2012, 10:51 AM
  5. Replies: 9
    Last Post: 11-06-2010, 06:10 AM
  6. drag a macro across cells
    By aysrun in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-24-2009, 05:02 AM
  7. Drag values down cells
    By mohd21uk via OfficeKB.com in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 06-07-2006, 03:10 PM

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