We're aware that some users are experiencing technical issues which the team are working to resolve. See the Community Noticeboard for more info. Thank you for your patience.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

Help with excel spreadsheet please

Options
2»

Comments

  • Heedtheadvice
    Heedtheadvice Posts: 2,769 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    edited 7 May 2024 at 4:19PM
    This is when you ought to be doing  a bit of learning so you can work these things out for yourself!
    Do an online search for COUNTIFS and you should be able to read the Microsoft description and come up with the answer.

    However as  starter the COUNTIFS function counts all cells in  specified range that meet 1 or more criteria that you define in the function.
    Tizerbelle has already given you the basis. Where the range to check for the matching criteria is all column A (A:A) and two criteria are following those defined ranges where the cell value in column A is both less than today and also greater than today minus 365. All that is entered in cells on column C ( plus a bit more following in column C to do the maths you required.)

    Virtually all yo need to do is to add a bit more to the countifs function to select column B and the criteria "=1" thus counting if the cells are in the desired date range ( rolling year ) and recorded as a sick day.

    Give it a try we will be happy to confirm what you do...



  • vix2000
    vix2000 Posts: 1,129 Forumite
    Part of the Furniture 500 Posts Combo Breaker
    Thank you for that.  I have searched extensively this last week but was not aware of the countifs formua so obviously not searching for the right thing!!!  Hopefully I can get it to work now.
  • GDB2222
    GDB2222 Posts: 26,204 Forumite
    Part of the Furniture 10,000 Posts Photogenic Name Dropper
    I use an old version of excel, but do modern versions have a SumIf function, similar to countifs? 


    No reliance should be placed on the above! Absolutely none, do you hear?
  • Heedtheadvice
    Heedtheadvice Posts: 2,769 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    I am not sure as I too use an old version (2007) but usually functions are carried forward into newer versions. Sumif() is certainly in version 365.

  • victor2
    victor2 Posts: 8,121 Ambassador
    Part of the Furniture 1,000 Posts Name Dropper
    SUMIF() and SUMIFS() are certainly there in Excel 2010 (my version!) and on.
    They would do the job, with the extra advantage that you wouldn't need an entry for every day, just the total number of sick days between two dates, and it will sum them.

    I’m a Forum Ambassador and I support the Forum Team on the In My Home MoneySaving, Energy and Techie Stuff boards. If you need any help on these boards, do let me know. Please note that Ambassadors are not moderators. Any posts you spot in breach of the Forum Rules should be reported via the report button, or by emailing forumteam@moneysavingexpert.com. 

    All views are my own and not the official line of MoneySavingExpert.

  • rmg1
    rmg1 Posts: 3,159 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    It might be worth investigating dynamic named ranges as well.
    You should be able to set up the named range to only refer to the cells you want and use those names in your formulae.
    You'll need two named ranges:-
    1) the dates you want
    2) the other column which contains the sick days (assuming 1 or 0)
    :wall: Flagellation, necrophilia and bestiality - Am I flogging a dead horse? :wall:

    Any posts are my opinion and only that. Please read at your own risk.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 350.9K Banking & Borrowing
  • 253.1K Reduce Debt & Boost Income
  • 453.5K Spending & Discounts
  • 243.9K Work, Benefits & Business
  • 598.8K Mortgages, Homes & Bills
  • 176.9K Life & Family
  • 257.2K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.1K Discuss & Feedback
  • 37.6K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.