+ Reply to Thread
Results 1 to 15 of 15

Create a Formula That Skips Every n Cells

  1. #1
    Registered User
    Join Date
    11-19-2013
    Location
    US
    MS-Off Ver
    Excel 2013
    Posts
    5

    Create a Formula That Skips Every n Cells

    Hello,

    I have a formula that I want to be able to drag down by the corner and apply the formula to the next 10 consecutive cells but I want the cells in the formula to move down by 4, not 1.

    Ex. I want cell N3=(C4+2*C5+3*C6)/C7 then I drag the corner and apply the formula to the rest of the cells in the column so that N4=(C8+2*C9+3*C10)/C11 , N5=(C12..... and so forth.

    I've tried arrays, MOD, Sumproduct, etc. but I'm just not grasping something.

    Thanks for your help.

  2. #2
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Create a Formula That Skips Every n Cells

    the auto increment wont work for this situation, so you need to do it in formula, maybe
    (I'm going to assume row 4 is where the c data starts)
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Drag down

    Hope this helps
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Create a Formula That Skips Every n Cells

    Try this

    =INDIRECT("C"&ROW(4:4)*4-12)+ROW($A2)*INDIRECT("C"&ROW(6:6)*4-18)/INDIRECT("C"&ROW(7:7)*4-21)

    See revised formula in the next post
    Last edited by AlKey; 11-19-2013 at 11:46 PM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Registered User
    Join Date
    11-19-2013
    Location
    US
    MS-Off Ver
    Excel 2013
    Posts
    5

    Re: Create a Formula That Skips Every n Cells

    Thank for the replies,

    dredwolf, the formula you suggested causes a #VALUE! error. I think there might be a circular reference issue.

    AlKey, your method also has potential. It returns values higher than what they should be though right now. Can you explain what the bolded part does "C"&ROW(4:4)*4-12 as well as why you chose to use ROW($A2) instead of another indirect string?

  5. #5
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Create a Formula That Skips Every n Cells

    My bad, forgot to lock the row() reference, sorry about that :
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    EDIT -
    As to a circular reference, you would know if it was, because excel will give a warning and ask if you want to continue
    Should not be any, as the data being used is in no way affected by the formula, and the value of the cell the formula is in does not rely on the value of the references to the same cell...
    Last edited by dredwolf; 11-19-2013 at 09:48 PM.

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Create a Formula That Skips Every n Cells

    Quote Originally Posted by tj2434 View Post
    Thank for the replies,

    AlKey, your method also has potential. It returns values higher than what they should be though right now. Can you explain what the bolded part does "C"&ROW(4:4)*4-12 as well as why you chose to use ROW($A2) instead of another indirect string?
    "C"&ROW(4:4)*4-12 creates a cell reference for use with indirect function. So if you try =ROW(4:4)*4-12 and drag it down you will see that it change from 4 to 8 and to 12, etc. ROW(4:4)*=16 -12 = 4) The "C" part and number 4 will make C4 and INDIRECT function converts this text into cell reference.

    Hope this help.


    And I think I found my mistake

    It should be this

    =(INDIRECT("C"&ROW(4:4)*4-12)+2*INDIRECT("C"&ROW(5:5)*4-15)+3*INDIRECT("C"&ROW(6:6)*4-18))/INDIRECT("C"&ROW(7:7)*4-21)
    Last edited by AlKey; 11-19-2013 at 11:42 PM.

  7. #7
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Create a Formula That Skips Every n Cells

    @ AlKey your missing an argument, and the +/* should be in parentheses' so the division happens to the whole value
    N3=(C4+2*C5+3*C6)/C7

  8. #8
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Create a Formula That Skips Every n Cells

    Quote Originally Posted by dredwolf View Post
    @ AlKey your missing an argument, and the +/* should be in parentheses' so the division happens to the whole value
    Thank you, this was already corrected. The formula now gives the same result as OPs.

  9. #9
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Create a Formula That Skips Every n Cells

    Or

    It is better to go for Non Volatile Approach....

    =(INDEX(C:C,4+(ROW(A1)-1)*4)+2*INDEX(C:C,5+(ROW(A1)-1)*4)+3*INDEX(C:C,6+(ROW(A1)-1)*4))/INDEX(C:C,7+(ROW(A1)-1)*4)


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  10. #10
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Create a Formula That Skips Every n Cells

    @ AlKey, yes you did, and good for you !
    but please do not get angry with me for pointing out a deficiency that you corrected AFTER I pointed it out, I make many mistakes, and TRY not get upset when someone points them out ...

  11. #11
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Create a Formula That Skips Every n Cells

    Quote Originally Posted by dredwolf View Post
    @ AlKey, yes you did, and good for you !
    but please do not get angry with me for pointing out a deficiency that you corrected AFTER I pointed it out, I make many mistakes, and TRY not get upset when someone points them out ...
    Dear dredwolf,

    It was never my intention to display any anger towards you and I am very sorry that you took that way. I am very thankful to you and to anyone who helps me to become better in what I love to do. One thing that I learned in life is that no matter how much you know, there is still more left to learn. So, once again please accept my sincere apology.

    Alex

  12. #12
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Create a Formula That Skips Every n Cells

    Just to echo Sixthsense's comment, this type of 'every nth row' problem can almost always be achieved by either an INDEX or INDIRECT approach, though I agree that, given this choice, it's preferable to take the non-volatile (i.e. INDEX) option.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  13. #13
    Registered User
    Join Date
    11-19-2013
    Location
    US
    MS-Off Ver
    Excel 2013
    Posts
    5

    Re: Create a Formula That Skips Every n Cells

    Thank you very much everyone! I've learned a lot and both the INDEX and INDIRECT methods worked for me.

  14. #14
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Create a Formula That Skips Every n Cells

    You are welcome

  15. #15
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Create a Formula That Skips Every n Cells

    You're welcome. Don't forget to thank those who helped by clicking on Add Reputation * and please mark thread as "Solved" if your issue has been resolved. (Selecting Thread Tools-> Mark 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. Tab skips over cells
    By tomtheappraiser in forum Excel General
    Replies: 7
    Last Post: 04-01-2013, 01:01 PM
  2. [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
  3. Replies: 0
    Last Post: 02-03-2012, 07:26 PM
  4. creating a formula that skips empty cells
    By turbo90talon in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 10-19-2007, 08:31 PM
  5. [SOLVED] How can I create a list that skips zero values?
    By S.K.S. in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-27-2005, 10:06 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