+ Reply to Thread
Results 1 to 4 of 4

Updating several cells with a migrating formula?? Hard to explain...

  1. #1
    Registered User
    Join Date
    03-25-2013
    Location
    Denver, Colorado, US
    MS-Off Ver
    Excel 2016
    Posts
    6

    Updating several cells with a migrating formula?? Hard to explain...

    Alright, hello everyone! I will get down to it and try to explain this the best I can.

    I have a compounding (multiple) countif formula that is referencing a "Break" table and looking for matches on the "schedule" section and then suming the counts in a table by 30 minute intervals. The issue is, now i need to apply this formula to over 700 cells, but have it updating where it's referencing the criteria from the break table to get the right counts for that interval.

    As an example, here is my first one for 12:00am to 12:30am ---=COUNTIF(Sat!E64:E120,Breaks!A2)+COUNTIF(Sat!E64:E120,Breaks!A3)+COUNTIF(Sat!E64:E120,Breaks!A4)+COUNTIF(Sat!E64:E120,Breaks!A5)+COUNTIF(Sat!E64:E120,Breaks!A6)+COUNTIF(Sat!E64:E120,Breaks!A7).

    the next formula, for 12:30am to 1:00am will need to read like this ---
    =COUNTIF(Sat!E64:E120,Breaks!A8)+COUNTIF(Sat!E64:E120,Breaks!A9)+COUNTIF(Sat!E64:E120,Breaks!A10)+COUNTIF(Sat!E64:E120,Breaks!A11)+COUNTIF(Sat!E64:E120,Breaks!A12)+COUNTIF(Sat!E64:E120,Breaks!A13)


    Because this is just for Saturday, and i cant just drag or copy>paste, I would have to update the Break references for each 30 minute internal, for all 7 days manually. That's 336 manual cell entries and 2016 countif formula updates. There has to be a more efficient, and effective way to update these formulas... I hope!

    See attachments! Thanks for your help in advance.
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,411

    Re: Updating several cells with a migrating formula?? Hard to explain...

    You could simplify your formula to this:

    =COUNTIFS(Sat!E$64:E$120,">="&Breaks!A2,Sat!E$64:E$120,"<"&Breaks!A8)

    or, as you have time intervals already in column B of the New sheet, you could do this:

    =COUNTIFS(Sat!E$64:E$120,">="&B4,Sat!E$64:E$120,"<"&B6)

    which will make it easier to copy down. I don't know why you are using alternate rows in the New sheet - it would be much easier to copy formulae down if you got rid of those blank rows.

    Hope this helps.

    Pete

  3. #3
    Forum Contributor
    Join Date
    06-28-2016
    Location
    Pennsylvania, USA
    MS-Off Ver
    2013
    Posts
    308

    Re: Updating several cells with a migrating formula?? Hard to explain...

    If you are keeping the blanks for whatever reason, try creating a helper column that will allow you to sort out even/odd rows (after unmerging cells). That way, you can just double click your new formulas down.

    You can create a very simple helper column with this:

    =mod(row(a1),2)

    that will return a 1 or 0 depending on if the row is even or odd, allowing you to filter out your even/odd rows accordingly (Ctrl+Shift+L to add a filter).

    with Pete's answer + this you should be able to maintain your workbook yourself.


  4. #4
    Registered User
    Join Date
    03-25-2013
    Location
    Denver, Colorado, US
    MS-Off Ver
    Excel 2016
    Posts
    6

    Re: Updating several cells with a migrating formula?? Hard to explain...

    Ah, yes! That worked! Thanks! I had the spaces in there because it helped me drag the lunch formula so it would like up correctly. I could have done the same with this one but it would have required me inserting 4 between each which seemed even more ridiculous. I thought to myself 'there has to be a better way', and there was thanks to you! Appreciate it!

+ 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 needed for planning chart - hard to explain in title !
    By chrisnewton in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-02-2013, 05:47 AM
  2. [SOLVED] Hard to explain, please help
    By FooFighter616 in forum Excel General
    Replies: 4
    Last Post: 06-13-2012, 02:20 PM
  3. Replies: 1
    Last Post: 09-25-2008, 04:50 PM
  4. [hard to explain problem in few words]
    By aka85 in forum Excel General
    Replies: 5
    Last Post: 08-30-2007, 05:58 AM
  5. Hard to explain question
    By odditie in forum Excel General
    Replies: 4
    Last Post: 02-16-2007, 05:09 PM
  6. [SOLVED] Help with spread sheet (Hard to explain)
    By facebuddies in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-08-2006, 11:04 AM
  7. Please help!!! This is hard to explain!
    By Robert Sadler in forum Excel General
    Replies: 4
    Last Post: 02-02-2005, 12:28 AM
  8. Please help!!! This is hard to explain!
    By Robert Sadler in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-01-2005, 05:48 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