+ Reply to Thread
Results 1 to 7 of 7

If statement using "between"

  1. #1
    Registered User
    Join Date
    11-13-2012
    Location
    Worcester
    MS-Off Ver
    Excel 2010
    Posts
    26

    If statement using "between"

    I have a spreadsheet (dummy attached).

    This has 4 tabs:

    Summary - this is a lookup from other tabs and works fine
    List of apprentices - this is a list of data and is fine
    Payments in (Levy) - again OK as list

    My query is on the Payments out (Training) tab.

    I would like column B to be a total SUM of the "monthly payment column" on the list of apprentices tab IF the month in Column A is between the start and end month on the list of apprentices tab.

    I would like column B to be a total SUM of the "End point payments" column from list of apprentices tab IF the month in Column A is the same as the end month on the list of apprentice tab

    Hope this makes sense and someone might be able to help!!!
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,735

    Re: If statement using "between"

    In a sample workbook, you also need to show your expected outcomes (manually calculated and entered). Thanks!
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    11-13-2012
    Location
    Worcester
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: If statement using "between"

    Sorry - uploaded attachment showing what I would expect on the Payments out tab

    Thanks
    Attached Files Attached Files

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

    Re: If statement using "between"

    You can use this formula in B2:

    =SUMIFS('List of Apprentices'!$J:$J,'List of Apprentices'!$G:$G,"<="&$A2,'List of Apprentices'!$I:$I,">"&$A2)

    and this one in C2:

    =SUMIFS('List of Apprentices'!$K:$K,'List of Apprentices'!$I:$I,$A2)

    then copy both formulae down.

    Note that these work because all your dates relate to the first of the month - you might need something more elaborate if your real dates are spread across a month.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    11-13-2012
    Location
    Worcester
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: If statement using "between"

    Excellent - thanks for help. Seems to have worked

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,735

    Re: If statement using "between"

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,181

    Re: If statement using "between"

    In B2

    =SUMIFS('List of Apprentices'!$J$2:$J$3,'List of Apprentices'!$G$2:$G$3,"<=" &'Payments out (Training)'!$A2,'List of Apprentices'!$I$2:$I$3,">="&'Payments out (Training)'!$A2)

    in C2

    =SUMIFS('List of Apprentices'!$K$2:$K$3,'List of Apprentices'!$I$2:$I$3,"="&EOMONTH('Payments out (Training)'!$A2,0))

    Change I2 to 31/01/2018

+ 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. [SOLVED] IF Statement Evaluates as "TRUE" but Returns "FALSE" Value (Excel 2007)
    By Simcik in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-11-2014, 12:43 PM
  2. How do I do incorporate an "if statement" with the ".find" method in a range?
    By max3732 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-22-2014, 08:14 PM
  3. "If statement" works, but not "select case". What am I doing wrong?
    By max3732 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-19-2014, 12:39 PM
  4. Replies: 12
    Last Post: 06-12-2014, 02:11 PM
  5. [SOLVED] Cell Color with"if" statement testing for a "text" value
    By ARocketScientist in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-08-2014, 09:01 PM
  6. [SOLVED] Using a "ColorIndexOfRange" function as criteria in an "averageif" statement
    By ndrobinson in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-16-2012, 03:40 PM
  7. Replies: 3
    Last Post: 12-14-2006, 01:36 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