+ Reply to Thread
Results 1 to 2 of 2

Sum a Row of numbers based on conditions

  1. #1
    Registered User
    Join Date
    01-29-2018
    Location
    Cali
    MS-Off Ver
    Microsoft 365 MSO 64-Bit Version 2008 (Build 13127.21216)
    Posts
    94

    Sum a Row of numbers based on conditions

    Hey Pros,

    Summary:
    I have a spreadsheet


    the top row from left to right is displaying dates, from oldest to most recent.

    A column, has a list of items that need to be compared.

    Per each item, are quantities on the row per column of the date.



    Looking a Tab Sheet2, you can see the formula I"m trying to do comes back as #value, I'm not sure why.


    I'm trying to sum across rows, with the conditions of of that particular row has the same Item Number, and if its in the columns that are before the date which is stated in 1 particular cell.


    the logic I tried to use in the formula might better explain the goal, please help.


    I'd love to know why it didn't work, to better learn what my error was.


    I've attached the document.
    Attached Files Attached Files

  2. #2
    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,929

    Re: Sum a Row of numbers based on conditions

    1. You do not have real dates in sheet1 heading, you have text looking like dates.. Change these to real dates
    I had a bit of trouble changing to dates because you have a structured table there. I converted back to a Range, entered the 1st date into E2, then F2=E2+1, copied across - then converting back to table.

    A quick look shows you only ever have 1 entry per Item per date? If that is the case, INDEX/MATCH/MATCH would be a better formula to use...

    If you cant change the text dates to real dates, try this...
    =INDEX('Raw Plant B Component Demand'!$E$3:$AE$46,MATCH(Sheet2!$A3,'Raw Plant B Component Demand'!$B$3:$B$46,0),MATCH(TEXT(Sheet2!C$1,"mm-dd-yyyy"),'Raw Plant B Component Demand'!$E$2:$AE$2,0))

    However, if you CAN change the text dates to real dates, then use this...
    =INDEX('Raw Plant B Component Demand'!$E$3:$AE$46,MATCH(Sheet2!$A3,'Raw Plant B Component Demand'!$B$3:$B$46,0),MATCH(Sheet2!C$1,'Raw Plant B Component Demand'!$E$2:$AE$2,0))
    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

+ 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 formula based on several criteria to extract data based on conditions
    By JEAN1972 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-17-2018, 12:46 PM
  2. Summing numbers based on multiple conditions across a range
    By docstew in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-02-2018, 04:05 PM
  3. Get numbers by two conditions
    By KingTamo in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-13-2018, 10:43 AM
  4. match numbers based on conditions and show the difference
    By coolmob in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-28-2017, 02:05 PM
  5. How to sum up numbers with conditions?
    By rockways in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-06-2015, 01:29 PM
  6. Replies: 3
    Last Post: 07-11-2012, 06:36 PM
  7. Calculate sum of numbers with conditions
    By Curtis in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 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