+ Reply to Thread
Results 1 to 21 of 21

Repeating inconsistent formula Help!

  1. #1
    Registered User
    Join Date
    07-15-2015
    Location
    California
    MS-Off Ver
    10
    Posts
    35

    Repeating inconsistent formula Help!

    Hi all, I have a table that has a formula I need to reset every 12 cells (to represent months in a year). What I am calculating is tax paid monthly for the year.
    So in cell 1 I have =H1
    Cell 2 I have =sum(H$1$:H2)
    Cell 3 I have =sum(H$1$:H3)
    Cell 4 I have =sum(H$1$:H4)
    Cell 5 I have =sum(H$1$:H5)
    Cell 6 I have =sum(H$1$:H6)
    Cell 7 I have =sum(H$1$:H7)
    Cell 8 I have =sum(H$1$:H8)
    Cell 9 I have =sum(H$1$:H9)
    Cell 10 I have =sum(H$1$:H10)
    Cell 11 I have =sum(H$1$:H11)
    Cell 12 I have =sum(H$1$:H12)

    Then in cell 13 I need the formula to start over for the new year with the following:
    Cell 13 =H13
    Cell 14 =sum(H$13$:H14)
    Etc...

    The problem is that I need this to repeat (reseting every 12 cells) for several thousand rows! I can enter this manually as above but this would take forever!! Is there a way to autofill or copy this formula to do this??

    Thanks so much!

  2. #2
    Forum Contributor
    Join Date
    07-13-2015
    Location
    Quebec, Canada
    MS-Off Ver
    2013
    Posts
    232

    Re: Repeating inconsistent formula Help!

    =H1
    =Sum(INDIRECT("H"&(ROUNDUP(row(H2)/12,0)-1)*12+1&":"&CELL("address",H2)))

    should work if I did not do any translate mistake
    Last edited by Jdevil; 07-21-2015 at 11:43 AM.

  3. #3
    Registered User
    Join Date
    07-15-2015
    Location
    California
    MS-Off Ver
    10
    Posts
    35

    Re: Repeating inconsistent formula Help!

    This looks pretty close but when I drag it out to autofill, it only repeats every 11 cells

  4. #4
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Repeating inconsistent formula Help!

    Hi,

    It works ok for me - in fact you don't even need the =H1 first, you can start with this and drag it down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If it's not working for you, can you maybe attach a sample file (with enough data to show the problem, but with any confidential info removed)?

    Regards,
    Aardigspook

    If your problem is solved, please go to 'Thread Tools' on your first post and 'Mark Thread as Solved'.
    You don't need to give me rep if I helped, but thanks are appreciated.

  5. #5
    Registered User
    Join Date
    07-15-2015
    Location
    California
    MS-Off Ver
    10
    Posts
    35

    Re: Repeating inconsistent formula Help!

    it works but skips the 12th month of the first year, could it be because I'm starting on H2 and not H1?

  6. #6
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Repeating inconsistent formula Help!

    Not sure
    Here's my file:
    Repeating resetting autofill 12m.xls

    Regards,
    Aardigspook

    If your problem is solved, please go to 'Thread Tools' on your first post and 'Mark Thread as Solved'.
    You don't need to give me rep if I helped, but thanks are appreciated.

  7. #7
    Registered User
    Join Date
    07-15-2015
    Location
    California
    MS-Off Ver
    10
    Posts
    35

    Re: Repeating inconsistent formula Help!

    I cant attach a sample for some reason but if you change all the values in column H to 10500 and drag each column down to start on H2, it skips the 12th month of the first year for some reason.

  8. #8
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Repeating inconsistent formula Help!

    Really not sure what's going on with that. Here's both a file showing the formulae in use, with your 10500 figure, and a picture in case you can't access the file.
    Repeating resetting autofill 12m showing formulae.xls
    Repeating resetting autofill 12m showing formulae.png
    I'm about to leave work (or my wife will kill me) but I'll try and have a look again at home tonight.

    Regards,
    Aardigspook

    If your problem is solved, please go to 'Thread Tools' on your first post and 'Mark Thread as Solved'.
    You don't need to give me rep if I helped, but thanks are appreciated.

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Repeating inconsistent formula Help!

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  10. #10
    Registered User
    Join Date
    07-15-2015
    Location
    California
    MS-Off Ver
    10
    Posts
    35

    Re: Repeating inconsistent formula Help!

    Thanks Aardigspook, go home, hate for you to get in trouble with the wife. When you have a chance, can you make it work starting on H2 instead of H1? this is where I run into issues as I am using a table which has headers on row 1.

    Thanks so much for your help.

  11. #11
    Registered User
    Join Date
    07-15-2015
    Location
    California
    MS-Off Ver
    10
    Posts
    35

    Re: Repeating inconsistent formula Help!

    Also, my work has an older version of Internet Explorer which does not allow me to attach a sample.

  12. #12
    Forum Contributor
    Join Date
    07-13-2015
    Location
    Quebec, Canada
    MS-Off Ver
    2013
    Posts
    232

    Re: Repeating inconsistent formula Help!

    The formula I initially provided was created to be used in the H2 cell, and was working for me. What exactly is happening the 12th month?

  13. #13
    Registered User
    Join Date
    07-15-2015
    Location
    California
    MS-Off Ver
    10
    Posts
    35

    Re: Repeating inconsistent formula Help!

    I was able to take a screenshot of the problem im having

    http://i150.photobucket.com/albums/s...m243/crop1.jpg

  14. #14
    Forum Contributor
    Join Date
    07-13-2015
    Location
    Quebec, Canada
    MS-Off Ver
    2013
    Posts
    232

    Re: Repeating inconsistent formula Help!

    Oh! I understand, I thought your data started on H1

    =SUM(INDIRECT("H"&(ROUNDUP((ROW(H2)-1)/12,0)-1)*12+1&":"&CELL("address",H2)))

    That should do it.

  15. #15
    Forum Contributor
    Join Date
    07-13-2015
    Location
    Quebec, Canada
    MS-Off Ver
    2013
    Posts
    232

    Re: Repeating inconsistent formula Help!

    Oh wait I just noticed something about your post:

    Which way is it divided?:



    H1 Nothing
    H2 January
    H3 February
    ...
    H13 December
    H14 January
    H15 February
    ...


    OR:


    H1 Nothing
    H2 January
    H3 February
    ...
    H13 December
    H14 Nothing
    H15 January
    ...

  16. #16
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Repeating inconsistent formula Help!

    Hi,

    Assuming your data starts in H2 then continues without any other interruptions, this should work:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Regards,
    Aardigspook

    If your problem is solved, please go to 'Thread Tools' on your first post and 'Mark Thread as Solved'.
    You don't need to give me rep if I helped, but thanks are appreciated.

  17. #17
    Registered User
    Join Date
    07-15-2015
    Location
    California
    MS-Off Ver
    10
    Posts
    35

    Re: Repeating inconsistent formula Help!

    Its divided as follows:

    H1 Nothing
    H2 January
    H3 February
    ...
    H13 December
    H14 January
    H15 February

    The formula above now has all months but it is doubling January every year after the first year see below:
    http://i150.photobucket.com/albums/s...3/crop%202.jpg

  18. #18
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Repeating inconsistent formula Help!

    See #9 how to attache a file.

    In a JPG the forummembers can't work and so they can't test it.

    So please add, for the benefit of all, the excel file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  19. #19
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Repeating inconsistent formula Help!

    Quote Originally Posted by rham243 View Post
    The formula above now has all months but it is doubling January every year after the first year <snip>
    Have you tried my formula in post 16?
    (which is based on Jdevil's original, just amended to start on row 2)

    Edit: Here are the original and amended formulae, highlighting the parts what's changed (+1 is now +2, the second H1 is now H2) and what to make sure you don't change (the first H1 stays as H1):
    Original formula:
    =SUM(INDIRECT("H"&(ROUNDUP(ROW(H1)/12,0)-1)*12+1&":"&CELL("address",H1)))
    Revised formula:
    =SUM(INDIRECT("H"&(ROUNDUP(ROW(H1)/12,0)-1)*12+2&":"&CELL("address",H2)))

    Regards,
    Aardigspook

    If your problem is solved, please go to 'Thread Tools' on your first post and 'Mark Thread as Solved'.
    You don't need to give me rep if I helped, but thanks are appreciated.
    Last edited by Aardigspook; 07-22-2015 at 03:26 AM. Reason: Point out differences between old and new formulae

  20. #20
    Registered User
    Join Date
    07-15-2015
    Location
    California
    MS-Off Ver
    10
    Posts
    35

    Talking Re: Repeating inconsistent formula Help!

    This revised formula worked perfectly. Thank you so so much for your help!!!

  21. #21
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Repeating inconsistent formula Help!

    Glad we were able to help.

    Regards,
    Aardigspook

+ 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. inconsistent behavior of a formula
    By loubedor in forum Excel General
    Replies: 1
    Last Post: 04-04-2015, 04:14 PM
  2. causes of inconsistent formula
    By ammartino44 in forum Excel General
    Replies: 1
    Last Post: 03-20-2015, 08:41 PM
  3. Inconsistent results for formula
    By Maxwel in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-27-2014, 08:04 PM
  4. Vlookup inconsistent formula
    By aboo in forum Excel General
    Replies: 2
    Last Post: 06-22-2011, 01:57 AM
  5. Formula - Works but inconsistent
    By karobonas in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-01-2011, 07:24 AM
  6. creating a repeating formula that doesn't show repeating values
    By cybershot in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 12-09-2010, 06:12 PM
  7. Inconsistent Formula??
    By AlienBeans in forum Excel General
    Replies: 1
    Last Post: 09-03-2006, 12:52 PM

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