+ Reply to Thread
Results 1 to 11 of 11

Calculating info in a column based on a "greater than" date & info in another column

  1. #1
    Registered User
    Join Date
    02-26-2017
    Location
    Los Angeles, CA
    MS-Off Ver
    MS Office 2013
    Posts
    6

    Question Calculating info in a column based on a "greater than" date & info in another column

    I apologize if this was covered elsewhere- I tried a search first and found similar threads, but nothing that helped. I have a report that lists deficiencies- each deficiency has it's own ID number, which I put in column A (specifically, A3:A192). In column I (I3:I192) is the inspection date- the date the deficiency was first noted. In J (J3:J192) is the completion date- when the deficiency was corrected. We have 30 days to correct deficiencies and close them out. So, I need a formula that tells me how many open deficiencies that I have that are over 30 days. There are a total of 15 open deficiencies. This should be simple, but I'm stymied. I tried a couple of formulas to show how many were over 30 days.

    First, I tried keeping it simple with =COUNTIF(I3:I192,">" & TODAY()-30) but that rendered 0. I also tried a variation of replacing "TODAY()" with cell B195 where I also had a TODAY() formula. Same result: zero.

    Next, I tried getting fancier with =SUMPRODUCT(--ISNUMBER(A3:A192),--(I3:I192>B195-30),--(J3:J192="")). That gave me 15. Problem is, 15 is the total number of open deficiencies that I have, under and over 30 days.

    Any suggestions?

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,031

    Re: Calculating info in a column based on a "greater than" date & info in another column

    Try this:

    =SUMPRODUCT((TODAY()-I3:I192>30)*(J3:J192=""))
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    02-26-2017
    Location
    Los Angeles, CA
    MS-Off Ver
    MS Office 2013
    Posts
    6

    Re: Calculating info in a column based on a "greater than" date & info in another column

    Hi Glen,

    That almost did it. The result was reduced to 10. Problem is, only 9 are actually greater than 30 days old. The other 6 are under. But the formula you came up with is way better than mine- I'm going mess around with it, see if I can get it working. As soon as I can figure out how, I'll upload my workbook. The attach function doesn't seem to be working for me.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,031

    Re: Calculating info in a column based on a "greater than" date & info in another column

    You must be making a mistake. See the sheet. Column D shows the number of overdue open cases (shaded manually in yellow) and cell I2 uses my formula to calculate the correct result.

    If yu still need to, will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-26-2017
    Location
    Los Angeles, CA
    MS-Off Ver
    MS Office 2013
    Posts
    6

    Re: Calculating info in a column based on a "greater than" date & info in another column

    You're definitely right about that: I am making a mistake- I just can't figure out where! I copied a small amount of the data from my original workbook and put it into a another excel doc to try the formula on a smaller amount. The data contained 14 of the original 15 open deficiencies. 8 are over 30 days, 6 are under. This time, the formula gave me the correct amount of open orders over 30 days: 8. So, now I'm really confused. I've gone over and over my original and can't find the error I am making. Maybe it's a formatting error. Anyway, I hope you don't mind, but I have attached both my original doc, "EOC WOs" and the smaller one that is displaying the correct number ("Sample").
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    02-26-2017
    Location
    Los Angeles, CA
    MS-Off Ver
    MS Office 2013
    Posts
    6

    Re: Calculating info in a column based on a "greater than" date & info in another column

    Ok, scratch that- I went looking one more time and realized that the range on the formula was one row too many. I changed it and now it works perfectly.

    Thank you very much!

  7. #7
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Calculating info in a column based on a "greater than" date & info in another column

    your column "I" "J" dates are not in date format. Kindly correct the same. You will get result in "E26" as answer is "8" (As per sample file)


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,031

    Re: Calculating info in a column based on a "greater than" date & info in another column

    Glad you got sorted and thanks for the Rep.

  9. #9
    Registered User
    Join Date
    02-26-2017
    Location
    Los Angeles, CA
    MS-Off Ver
    MS Office 2013
    Posts
    6

    Re: Calculating info in a column based on a "greater than" date & info in another column

    Thank you Glenn and AVK- Now I just have to figure out how to put the [Solved] in the thread headline.

  10. #10
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,554

    Re: Calculating info in a column based on a "greater than" date & info in another column

    To mark the thread as 'Solved' use the thread tools link above your first post.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  11. #11
    Registered User
    Join Date
    02-26-2017
    Location
    Los Angeles, CA
    MS-Off Ver
    MS Office 2013
    Posts
    6

    Re: Calculating info in a column based on a "greater than" date & info in another column

    Done- thank you Sir!

+ 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. Need to auto populate the "X" and "Z" with the info from the "Info Sheet"
    By BURENYMAC915 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-10-2014, 06:28 PM
  2. Replies: 4
    Last Post: 10-02-2013, 03:00 PM
  3. Replies: 0
    Last Post: 02-18-2013, 03:47 PM
  4. Replies: 4
    Last Post: 10-04-2012, 02:54 PM
  5. Pull data from different columns based on info in column "A".
    By PowerSchoolDude in forum Excel General
    Replies: 2
    Last Post: 08-25-2009, 03:25 PM
  6. Replies: 0
    Last Post: 07-09-2009, 04:07 PM
  7. How to turn column "B" info into column "A" hyperlink?
    By stealthauto in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-21-2008, 02:31 PM

Tags for this Thread

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