Returning Min date based on criteria ignoring blank dates - excel

I'm trying to return the Min date based on criteria.
A
B
C
D
E
F
Frank
01/01/2014
Susan
Susan
01/01/2018
Min
08/01/2010
Susan
12/01/2021
Max
12/01/2021
Susan
Susan
08/01/2010
The following formula works fine in cell F2 as long as there are no blanks in the date column B. If there are any blanks it returns 01/0/1900
=MIN(IF(A:A=E1,B:B))
I found this solution that ignores blanks but returns the Min date from the entire column, not based on any criteria.
=MIN(IF(B:B=0,"",B:B))

Thank you for the lucid and easily reproducible question. This should do the trick for you:
=MINIFS(B:B, A:A, E1, B:B, "<>")
It ensures that empty date cells corresponding to the given name are not considered.

Related

If there a function to count a cell if it’s blank or non- blank based on if it’s located with in cellls in a date range?

Criteria I need my formula based on:
A
B
C
1
7/3/2021
2
7/5/2021
3
July 1,2021
775
4
July 2,2021
788
5
July 3,2021
73738
6
July 4,2021
73738
7
July 5,2021
73738
if the column c is blank or has a number in it (doesn’t matter what number)
if the cell c corresponds with cell b if it is in between the dates in B1 & B2
so essentially there would be 3 cells counted in this instance
What I am doing is in column B i’m entering in all the days in the month. Then in B1(admission date) B2 ( discharge date) , In c I will write a value .
I want the formula to count the cells(C:C) (both blank and non blank) between admission date and discharge date that the patient was admitted for .
The function below counts the number of entries between B1 and B2 whether they are blank or not.
=COUNTIFS(B3:B7,">="&B1,B3:B7,"<="&B2)
The formula will return 3 for your example. Your question doesn't clarify how blank cells affect this count but more conditions could be added to it.

If Cell Contains XXX Then Return Corresponding Value

A B C D
1 Ross Sales John Guys Finance
2 Smith Sales Sam Andy #N/A or False
3 Guys Finance Mike Ross Sales
I'm putting this formula in cell "D1" but it's not giving me correct result
=IF(SUMPRODUCT(--ISNUMBER(SEARCH(A:A,C:C)))>0,B:B)
INDEX MATCH function would not work because it's not exact value
What can I put in "D1" and down to give me result as in the table above?
Try this in D2,
=LOOKUP(1E+99, SEARCH(A2, C:C), B:B)
'or cut down the full column references
=LOOKUP(1E+99, SEARCH(A2, C$2:C$4), B$2:B$4)
'alternately as a wildcard MATCH
=INDEX(B:B, MATCH("*"&A2&"*",C:C, 0))
Fill down as necessary.
      

Count cells if two criteria - but sumproduct didnt work (Excel

I need help with this, please:
I have a table with lot of data and I need count rows where is specific name and specific time (for example John 7:15, Tom 7:00, Nick 8:00 and I need know how many times in table is John beetven 7:00-08:00 and so on...)
countif(s), sumproducts didnt working for me :(
Thanks
First, select your entire times Column and make sure it is all in hh:mm:ss (hours, minutes, seconds) format.
In Column C, set up a Countifs function, with:
The first criteria range being Column A (names)
The first criteria being the name you are looking for, in quotes
The second criteria range being Column B (times)
The second criteria being ">(insert minimum hh:mm:ss value here)"
The third criteria range being Column B (times)
The third criteria being "<(insert maximum hh:mm:ss value here)"
If you can create extra columns, then you may want to try this. I assume the times may have minutes, so that you may have "nick" in cell C2 and "8:15" in cell D2. You want to know how many Nicks there are between 8 and 9? Then in cell E2, extract the hour from the time with "=HOUR(D2)".
Then use COUNTIFS to handle multiple criteria. Let's say you put "Nick" in cell A1 and the number 8 in cell A2, for 8am. Then in cell A3 you could write "=COUNTIFS(C2:C5,A1,E2:E5,A2)" .
I like countifs (with an s) better than countif because it handles multiple criteria better.
Hope this helps.
Column A:
John
John
John
John
John
Tom
Nick
Nick
Nick
Nick
Nick
Nick
Nick
Tom
Tom
Column B:
7:15
8:15
9:15
7:15
7:15
7:00
8:00
9:00
10:00
11:00
12:00
13:00
14:00
7:00
8:00
Formula in C2 cell:
=COUNTIF(A:A,A2)
Formula in D2 cell:
=COUNTIFS(A:A,A2,B:B,B2)

Count the cells that value in excel

I want to get the count of cells in each row that has a value in it.
ross dan bernard 3
mary 2
rose johnny 2
I want a formula that gives counts the non blank values in each row and gives the value in column E (ie., 3,2,2)
You can use the CountA function:
=COUNTA(A1:Z1)

Want to search text from a group of words and then sum in excel

I have a data as below -
Name Amount
John Martha 20
John ABS 30
Man XYZ 10
Now, I want excel to search John from all rows and sum the value against it.
For example - John - 50
If you'd like to sum all values in column B where corresponding value in column A contains substring John, use this one:
=SUMIF(A1:A10,"*John*",B1:B10)
If you'd like to sum all values in column B where corresponding value in column A starts from John, use this one:
=SUMIF(A1:A10,"John *",B1:B10)
in both formulas range A1:A10 contains names and B1:B10 - amount

Resources