COUNTIFS with Numeral comparison - excel

Not sure what mistake I doing with CountIFS.
Cells A1:A8 refer to cells in another sheet and B1 has the formula
=COUNTIFS(A1:A8,">2020")
it gives 0
But same values are hard typed in C1:C8 and D2 that references C1:C8 gives the right answer
Thanks

Here is a formula that will work for either Text or Numbers in column A:
=SUMPRODUCT((--(--A1:A8>2020)))

Related

IF statement: IF cell is blank, leave blank, if not display 1

I would like column G to reference cells in column A. IF column A does not have a value in it, I would like the cells in column G to be blank. IF cells in column A have values in it, I would like cells in column G to display "1".
The cells in column A have a formula in it referencing a different sheet.
The formula I have so far is:
G1=IF(ISBLANK(A1), G1="", 1)
Right now, it displays "1" in column G because there is a formula in column A
A1=JE!C7
but I only need it to display "1" if there is actual data from the other sheet, "JE", in it.
If anyone know if a work around, I'd be very grateful. Thanks in advance!
Use A1="". ISBLANK() will not return true if there is a formula in A1 even if that formula returns "".
Also G1="" is incorrect, you only need to put the "".
Use this formula:
=IF(A1="","", 1)
In A1 I put the following formula:
=IF(1=1,"",1)
And as you can see in G1 it returns "" and not 1.
try this formula
=IF(OR(A12="",ISBLANK(A12)),"",1)
This should fix the issue
Use function:
IFTEXT(
This works because a formula is text -- not blank or a number

Alternative to vlookup with exact and approximate match doesnt work

Cell A1: 0553400710
Cell A2: John
Cell B1: ['0553400710', '0553439406']
Note:
List item Cell B1 has a fixed format of ['number','number,'number',...... ]
A1 and A2 are user input values
I want to match 0553400710 in Cell A1 with ['0553400710', '0553439406'] in Cell B1.
If it matches, I want to return A2: John.
Is it possible?
Vlookup failed to work by the way. I am looking for some technique which uses the advantage of fixed format
Picture 1: This is the formula i have tried
Picture 2: This is the table where the vlookup is showing wrong values
Picture 3: This is the array where vlookup check
Going by the sample data (and references) in your narrative and ignoring the image(s), a simple wildcard match should be sufficient.
=IFERROR(INDEX(A:A, MATCH("*"&A1&"*",B:B, 0)+1), "")
Have you tried index/match?
=index(return_range,match(cell_to_match,range_to_match,0))

Excel - Does a range of cells contain a value in a list?

I want to answer - does a range of cells (A1:E1) contain any value from a list (G1:G50)
In other words: Does A1 OR B1 OR C1 OR D1 OR E1 contain any value that appears in G1:G50
This formula might give you the result you want:
=SUM(IFERROR(MATCH(A1:E1,G1:G50,0),0))>0
You have to make it an array formula. That means after typing or pasting this formula into you target cell you have to commit it not as usual with simple 'Return' but by 'Ctrl+Shift+Return'. If you did it right the formula will be surrounded by curled brackets in formula bar.
You can use COUNTIF within SUMPRODUCT like this
=SUMPRODUCT(0+(COUNTIF(A1:E1,G1:G50)>0))>0
That doesn't need "array entry"

Need formula using SUMPRODUCT that bypasses #VALUE! entries

I have the following formula:
=SUMPRODUCT(--((('Sheet1'!$L$2:$L$100000<=X8)*'Sheet1'!$L$2:$L$100000)>=W8))
Column L is an output of dates. X8 and W8 are dates that collectively form a range.
This formula works great if all dates are returned or if there are some blank cells in column L. But if instead any cell in column L has code that returns #VALUE!, then the formula breaks down.
So basically, I need to modify this formula to accommodate for the fact that some cells in column L return #VALUE!. Is there a way to overlook such cells so that the formula only handles cells that have returned actual dates?
As I follow up from comments, this formula works:
=COUNTIFS('Sheet1'!$L$2:$L$100000,"<="&X8,'Sheet1'!$L$2:$L$100000,">="&W8)

SumProduct over Range that includes text

I'm trying to use a sumproduct formula over a range (e.g., A2:B10) given that the corresponding cell in column C = "Mike" - I keep getting #value errors thrown at me because there is text in some cells in the A2:B10 range.
I'm looking for the sum of the numbers(assuming it's a number) in each row with "Mike" in column C.
Formulas I've tried:
=SUMPRODUCT(--(C2:C10="Mike"),A1:B10)
=SUMPRODUCT((C2:C10="Mike")*(A1:B10))
=SUMPRODUCT(A1:B10,C2:C10="Mike")
Any help is appreciated, Thanks!
Try this formula with SUMPRODUCT
=SUMPRODUCT(A2:B10,(C2:C10="Mike")*ISNUMBER(A2:B10))
or you can use an "array formula"
=SUM(IF(C2:C10="Mike",A2:B10))
that latter formula needs to be confirmed with CTRL+SHIFT+ENTER so that curly braces appear around the formula in the formula bar

Resources