+ Reply to Thread
Results 1 to 15 of 15

Displaying Specific Rows and Summing Values in a Column with Invalid Data

  1. #1
    Registered User
    Join Date
    10-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    19

    Displaying Specific Rows and Summing Values in a Column with Invalid Data

    Hello, I have 2 questions about Excel 2003:

    1) I want to extract (display) all rows where columns G-M have the value of "No".

    2) How do you sum a column of values where you may have invalid data in those cells like an invalid date value of 41235? If any invalid data is in the cell, I want the sum function to see it as a 0.

    Thanks so much,
    Terrie

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Displaying Specific Rows and Summing Values in a Column with Invalid Data

    1. Out in Column N, put =IF(COUNTIF(G5:M5,"No")=7,1,0) Now you can filter column N by the 1's.

    This will only show all rows that contain all No's. If you instead want to see ANY row with at least one No, change it to =IF(COUNTIF(G5:M5,"No"),1,0).

    2. What makes 41235 invalid? This the number value of 11/22/2012.

    Excel stores dates as numbers, which are the count of days since 1/1/1900. If you are working with dates and a weird little 5 digit number pops up, change that cell's format to date. Time works similarly, as a percentage of 1 day. Therefore, 12:00:00 (noon) is stored as a general number of .5

    If you wanted to omit all dates and your values aren't really large you could SUMIF(range,"<"&30000) which would exclude any dates since 1985.
    Last edited by daffodil11; 10-30-2013 at 12:46 PM.

  3. #3
    Registered User
    Join Date
    10-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Displaying Specific Rows and Summing Values in a Column with Invalid Data

    First, thank you for such a quick response.

    In reference to my first question, I need a total count of all rows that have "No" in columns G:M. So, could you please explain how placing that formula in the cell holding the count will give me a correct result? Thanks for your patience. I'm learning...

    In reference to your second response, what does "&20000" mean? Right now, the formula I'm using (which of course adds the cell with the date value) is =SUMIF(rawdata1!EA3:EA132, ">0").


    Thanks again,
    Terrie

  4. #4
    Registered User
    Join Date
    10-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Displaying Specific Rows and Summing Values in a Column with Invalid Data

    First question: I have 130 rows that Excel has to search through to see if G:M have all "No"s.

  5. #5
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Displaying Specific Rows and Summing Values in a Column with Invalid Data

    Then to exclude the dates after 1985 you can use SUMIFS instead.

    =SUMIFS(rawdata1!EA3:EA132, ">"&0,rawdata1!EA3:EA132,"<"&30000)

    This translates to sum the cells which are greater than zero AND less than 30000.

    The ampersand "&" is used for concatenation. It tells Excel to evaluate what comes before and after as two separate expressions. "<0" will work in many SUMIF scenarios, but it can create issues down the road. Breaking the operator "<" out from the zero tells Excel that it is an operator and not that you're literally searching for cells with "<0" in them. It may work for you now, but understanding how the function works can prevent issues down the road in other situations.

  6. #6
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Displaying Specific Rows and Summing Values in a Column with Invalid Data

    As for finding out how many rows have all No's you could use the first suggestion and then simply SUM column N. This is the count of all rows that contain all No's.

    If you wanted a single step process, you could use COUNTIFS or SUMPRODUCT.

    Assuming your data runs G2:M131:

    =COUNTIFS(G2:G131,"No",H2:H131,"No",I2:I131,"No",J2:J131,"No",K2:K131,"No",L2:L131,"No",M2:M131,"No")

    =SUMPRODUCT((G2:G131="No")*(H2:H131="No")*(I2:I131="No")*(J2:J131="No")*(K2:K131="No")*(L2:L131="No")*(M2:M131="No"))
    Last edited by daffodil11; 10-30-2013 at 01:29 PM. Reason: Missed a parenthese!

  7. #7
    Registered User
    Join Date
    10-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Displaying Specific Rows and Summing Values in a Column with Invalid Data

    I entered your SUMIFS function and Excel did not like it. It said, I had entered too few arguments.

    Also, did you have a response to my first question's reply?

    Thanks

  8. #8
    Registered User
    Join Date
    10-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Displaying Specific Rows and Summing Values in a Column with Invalid Data

    sorry. please ignore the last question. but I did have a problem with the SUMIFS.

  9. #9
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Displaying Specific Rows and Summing Values in a Column with Invalid Data

    Oops. =SUMIFS(rawdata1!EA3:EA132,rawdata1!EA3:EA132, ">"&0,rawdata1!EA3:EA132,"<"&30000)

    Missed the sumrange.

    SUMIFS(sum range, criteria range1, criteria1, etc)

  10. #10
    Registered User
    Join Date
    10-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Displaying Specific Rows and Summing Values in a Column with Invalid Data

    The SUMPRODUCT worked like a champ! Thanks! Trying the SUMIFS again now.

  11. #11
    Registered User
    Join Date
    10-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Displaying Specific Rows and Summing Values in a Column with Invalid Data

    The SUMIFS worked too. Again, thank you.

  12. #12
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Displaying Specific Rows and Summing Values in a Column with Invalid Data

    Hurray! Glad I could help out.

  13. #13
    Registered User
    Join Date
    10-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Displaying Specific Rows and Summing Values in a Column with Invalid Data

    What does this mean?
    =SUMIF(E19:E33,"5",D19:D33)+SUMIF(E19:E33,"",D19:D33)

    To me, it's saying if for each cell from 19 through 33 of column E, there's a 5 there, then use it in the sum. But what's happening with the + symbol and what appears to be adding a blank string. Does the plus symbol represent concatenation?

    Thanks.

  14. #14
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Displaying Specific Rows and Summing Values in a Column with Invalid Data

    Nopes!

    SUMIF(criteria range, criteria, [sum range])

    If E19:E33 contains a 5, add up the same row in column D.

    If no secondary range is specified, it will add up the first range. In your case a 2nd range was specified so it's adding up in E instead.

  15. #15
    Registered User
    Join Date
    10-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Displaying Specific Rows and Summing Values in a Column with Invalid Data

    daffodil11, I figured it out after posting the question, but I sure appreciate your response. Good explanation. Thank you.

+ 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. Displaying values in Column & rows ?
    By Zaid in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-19-2013, 07:39 AM
  2. Summing rows in a column up to a specific value
    By karmenkame in forum Excel General
    Replies: 3
    Last Post: 11-29-2012, 10:55 PM
  3. Replies: 2
    Last Post: 11-08-2012, 06:31 PM
  4. Macro Loop to Extract Specific Values and Min/Max Values From Column/Rows Range
    By ExcelQuestFL in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 12-19-2010, 09:19 AM
  5. values of column displaying in rows
    By deepak.kec in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-30-2009, 08:11 AM

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