+ Reply to Thread
Results 1 to 18 of 18

drag multiple functions, formula skips cells

  1. #1
    Registered User
    Join Date
    06-29-2016
    Location
    Amsterdam
    MS-Off Ver
    ms office 15
    Posts
    11

    drag multiple functions, formula skips cells

    My question:

    I have a big data file with 4 formulas. The second, third and fourth formula are linked with the first formula. The first formula is linked to data on different tabs.

    the first formula is:

    1e formula =INDEX(Table68[Number];MATCH('values 10% hoogste return'!D5;Table5[Dec-91];0))

    Here the D5 should go to E5 etc when I drag it the months at the end of the formula should also go one month further. When I drag this it is no problem but I want to drag all 4 formulas at the samen time. But when I do that the D5 becomes H5 but which should become E5. This is because the formula is getting dragged to 4 cells further (because I have 4 formules in a row). The months do change with one step at a time so that part of the function does not give a problem.

    So my question is: can I drag all formulas at once? In such way that they change to the good number?


    The other formulas are:

    2e =VLOOKUP(F10;'6 maands cumulatief'!$A2:$B2645;2;0)

    3e =VLOOKUP(F10;'6 maand cumu'!$A2:$JL2645;COLUMN(Table5[Dec-91]);0)

    4e =VLOOKUP(F10;Table44;COLUMN(Table44[31/12/1992]);0)

    The F10 in the formula refers to the cell before the second formula, so the cell where the first formula is in.*
    So you could say that the second formule uses the cell before it own cell, the third formula 2 cells before its own cell, and the fourth formula 3 cells before its own.*

    Does anyone know how to do this? Because I have 300 columns to make if I have to do it per formula I need to make 1200 formulas and insert them by hand, which is going to take a very long time.

    Thank you in advance!

    Lars

    PS. I attached the beginning of my file the formulas can be found on the tab portfolios
    Attached Files Attached Files
    Last edited by larsweil; 01-23-2017 at 09:32 PM.

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

    Re: drag multiple functions, formula skips cells

    Instead of D5 in your formula, use: OFFSET($D$5,,INT((COLUMNS($D:D)-1)/4),,)
    Instead of E5 in your formula, use: OFFSET($E$5,,INT((COLUMNS($D:D)-1)/4),,)
    Instead of F5 in your formula, use: OFFSET($F$5,,INT((COLUMNS($D:D)-1)/4),,)
    Instead of G5 in your formula, use: OFFSET($G$5,,INT((COLUMNS($D:D)-1)/4),,)
    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

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

    Re: drag multiple functions, formula skips cells

    Apologies, you'll have to use ; and not , in the formulae, as I didn't spot that you're in Amsterdam...
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    06-29-2016
    Location
    Amsterdam
    MS-Off Ver
    ms office 15
    Posts
    11

    Re: drag multiple functions, formula skips cells

    Glenn, when I put this in de formula Excel tells me the formula contains an error. the formula is like this:

    =INDEX(Table68[Number];MATCH('values 10% hoogste return'!OFFSET($D$5;;INT((COLUMNS($D:D)-1)/4);; );Table5[Dec-91];0))

    Is this correct or do I need to change things? I am sorry but I am kind of an Excel noob.


    Lars
    Last edited by larsweil; 01-23-2017 at 09:53 PM.

  5. #5
    Registered User
    Join Date
    06-29-2016
    Location
    Amsterdam
    MS-Off Ver
    ms office 15
    Posts
    11

    Re: drag multiple functions, formula skips cells

    Can I just copy paste it into my own formula?

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

    Re: drag multiple functions, formula skips cells

    =INDEX(Table68[Number];MATCH(OFFSET('values 10% hoogste return'!$D$5;;INT((COLUMNS($D:D)-1)/4);; );Table5[Dec-91];0))

    if that's not it, please post a sheet. It's always easier to test things when we have a sample sheet...

  7. #7
    Registered User
    Join Date
    06-29-2016
    Location
    Amsterdam
    MS-Off Ver
    ms office 15
    Posts
    11

    Re: drag multiple functions, formula skips cells

    No that's not it. When I drag it down the formula stays the same now. I posted the first columns of my file, they are attached to my first post.

  8. #8
    Registered User
    Join Date
    06-29-2016
    Location
    Amsterdam
    MS-Off Ver
    ms office 15
    Posts
    11

    Re: drag multiple functions, formula skips cells

    When I drag it to the right it does work so that solved the problem. But now when I drag the formula down it does not work the way it should work because it does not skip from D5 to D6 anymore..

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

    Re: drag multiple functions, formula skips cells

    use this in J10:

    =INDEX(Table68[Number];MATCH(OFFSET('values 10% hoogste return'!$H$5;;INT((COLUMNS($J:J)-1)/4);; );Table5[Jan-92];0))

    it still gives an error in your sample, as there's no Table 5 in it.

  10. #10
    Registered User
    Join Date
    06-29-2016
    Location
    Amsterdam
    MS-Off Ver
    ms office 15
    Posts
    11

    Re: drag multiple functions, formula skips cells

    Table 5 is tab 6 maands cumu it is strange because it says the column number is table 68 and the other columns are table 5. The formula you just posted gives the same problem because when I drag it down it does not change from H5 yo H6.
    My apologies for the Dutch words in the file.

  11. #11
    Registered User
    Join Date
    06-29-2016
    Location
    Amsterdam
    MS-Off Ver
    ms office 15
    Posts
    11

    Re: drag multiple functions, formula skips cells

    On tab 6 maands cumu is the column numbers table 68 and the other columns are table 5.
    Last edited by larsweil; 01-23-2017 at 10:35 PM.

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

    Re: drag multiple functions, formula skips cells

    Duhhhh. It's early morning here in Thailand and the coffee hasn't worked yet.

    =INDEX(Table68[Number];MATCH(OFFSET('values 10% hoogste return'!$H5;;INT((COLUMNS($J:J)-1)/4);; );Table5[Jan-92];0))

  13. #13
    Registered User
    Join Date
    06-29-2016
    Location
    Amsterdam
    MS-Off Ver
    ms office 15
    Posts
    11

    Re: drag multiple functions, formula skips cells

    hmm does not seem to work. I get value not available error now

  14. #14
    Registered User
    Join Date
    06-29-2016
    Location
    Amsterdam
    MS-Off Ver
    ms office 15
    Posts
    11

    Re: drag multiple functions, formula skips cells

    =INDEX(Table68[Number];MATCH(OFFSET('values 10% hoogste return'!$D$5;;INT((COLUMNS($D:H)-1)/4);; );Table5[Jan-92];0))

    This formula works for dragging it to the right but does not work when I have to drag it down. But I think if I maybe just delete the $ before de 5 of $D$5 is should be fine. But I am not sure because I do not know much about Excel.

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

    Re: drag multiple functions, formula skips cells

    It seems to work OK for me.... when there is actually a value in table 5 for the formula to match.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    06-29-2016
    Location
    Amsterdam
    MS-Off Ver
    ms office 15
    Posts
    11

    Re: drag multiple functions, formula skips cells

    Yeah it's the same is this one isn't it?

    =INDEX(Table68[Number];MATCH(OFFSET('values 10% hoogste return'!$D5;;INT((COLUMNS($D:D)-1)/4);; );Table5[Dec-91];0))

    Because this one works for me. Thank you so much for you time and help!

    one other question: If I delete the columns before the formulas the formula will give a #REF! error, do you know how to delete these columns without getting this error?

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

    Re: drag multiple functions, formula skips cells

    I just selected all the columns to the left of the formula and deleted them. As you can see, it still works fine.
    Attached Files Attached Files

  18. #18
    Registered User
    Join Date
    06-29-2016
    Location
    Amsterdam
    MS-Off Ver
    ms office 15
    Posts
    11

    Re: drag multiple functions, formula skips cells

    wauw I am sorry I think I did something very strange but it works for me now to. Maybe I am just tired because it's 5 in the morning. I am going to sleep now how can I put this on solved? Thank you so much again for you help!

    Lars

+ 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. Formula to look up multiple values and skips to the next one if an error
    By sonyablade090 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-29-2016, 03:28 AM
  2. [SOLVED] Drag Formula that Skips 1 Column
    By brendangroff in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-14-2016, 03:01 PM
  3. Replies: 14
    Last Post: 11-26-2015, 09:43 AM
  4. Formula that skips blank cells
    By chisox721 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-17-2013, 01:03 AM
  5. [SOLVED] Create a Formula That Skips Every n Cells
    By tj2434 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 11-20-2013, 05:30 PM
  6. [SOLVED] Drag Formula that skips every 12 Rows
    By kqball in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-01-2013, 12:35 PM
  7. [SOLVED] Need Formula that skips cells when using Autofill
    By Asaan in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-20-2012, 10:54 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