+ Reply to Thread
Results 1 to 8 of 8

Pull A Value and SUM in a Range based on a Date in Another Range

  1. #1
    Registered User
    Join Date
    01-15-2012
    Location
    Noneofyourbusiness, CO
    MS-Off Ver
    Excel 2007
    Posts
    34

    Pull A Value and SUM in a Range based on a Date in Another Range

    Hello Everyone!

    As usual, thank you for any help you can offer! As you can see in the image I have Dates in A3:L3 that are formatted as "mmm". In A4:L4 I have values depending on the month of the year.

    I would like to make it so that when I enter a Date into cell A10 (also formatted as "mmm") that in cell A7 the number will show up only for that month and in E7 the sum of the values up to that month will appear.

    Is there a way to do this?

    Also, this is not the spreadsheet I'm actually working on or I would just do the SUM and enter the numbers manually.

    Thank you and have a wonderful day!

    Excel Question.jpg

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Pull A Value and SUM in a Range based on a Date in Another Range

    Disregarding how your cells are formatted.
    What are the actual complete values you're entering in A3:L3 and A10 ?
    Are they actual dates like 1/1/2013, 2/1/2013?
    Or are they just text strings, where you literally type Sep ?

  3. #3
    Registered User
    Join Date
    01-15-2012
    Location
    Noneofyourbusiness, CO
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Pull A Value and SUM in a Range based on a Date in Another Range

    They are dates. Usually I type in something like "02/2013" and it automatically converts to "02/01/2013" but shows up as "Feb".

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Pull A Value and SUM in a Range based on a Date in Another Range

    Most Excellers don't like to hear things like
    Quote Originally Posted by Caulerpa View Post
    Usually I type in something like "02/2013"
    We prefer ALWAYS...
    Inconsistency of data entry is the root of all evil in Excel.


    But if the dates are always the 1st of each month, then this will work

    A7: =INDEX(A4:L4,MATCH(A10,A3:L3,0))
    E7: =SUMIF(A3:L3,"<="&A10,A4:L4)
    Last edited by Jonmo1; 04-02-2013 at 01:32 PM.

  5. #5
    Registered User
    Join Date
    01-15-2012
    Location
    Noneofyourbusiness, CO
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Pull A Value and SUM in a Range based on a Date in Another Range

    I can change the formatting of the dates I just thought it would be easier that way.

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Pull A Value and SUM in a Range based on a Date in Another Range

    Quote Originally Posted by Caulerpa View Post
    I can change the formatting of the dates I just thought it would be easier that way.
    How the cells are formatted doesn't matter.
    Because formulas look at the ACTUAL value in the cell, not how the cell is formatted.

    In Other words, if A1 is a DATE 1/1/2012
    And A1 is formatted as "mmm"
    Then =A1="Jan" will be FALSE
    Because the actual complete value is still in the cell, it's only "Displaying" the formatted value of Jan.

  7. #7
    Registered User
    Join Date
    01-15-2012
    Location
    Noneofyourbusiness, CO
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Pull A Value and SUM in a Range based on a Date in Another Range

    You are my hero for the day!

  8. #8
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Pull A Value and SUM in a Range based on a Date in Another Range

    Glad it worked out.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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