VLOOKUP not working when referencing cell - excel-formula

I am using VLOOKUP like this:
=VLOOKUP(K4,'Odds Scale'!$I$4:$J$84,2,FALSE)
Cell K4 is a formula that results in 0.15
The VLOOKUP fails with code #N/A
When I type 0.15 into cell K4 directly the VLOOKUP returns the correct result. It only fails when a formula calculates the cell to 0.15.
I have done VLOOKUP with cells that have formulas in them before so this should work. What is my issue here? Thanks

K4 is returning a value and excel is only showing the first two decimal places. The actual value in K4 may be .148909879 or something like that, which when displayed to only two decimals is .15.
Try rounding the number in K4 to two decimals in the VLOOKUP:
=VLOOKUP(ROUND(K4,2),'Odds Scale'!$I$4:$J$84,2,FALSE)

Related

I can't find the error in my formula that's causing the #VALUE

My formula is
=IF(OR(ISBLANK(F2),ISBLANK(D2)),"MISSING",F2-D2)
D2 and F2 are both dates, F2 only has a date if something has been entered for that invoice so not all cells in column F have a date. So if the cell in column F is blank, I want the formula to put "MISSING" in the cell of the formula but I'm getting
#VALUE!
Where am I going wrong with this formula?
Your formula will attempt the subtraction even if the values in the cells are text.
If you want to calculate only when both cells have dates, then use IsNumber() instead of IsBlank(), but you need to change OR() to AND() and reverse the true/false actions.
=IF(AND(ISNUMBER(F6),ISNUMBER(D6)),F6-D6,"Missing")

COUNTIFS with Numeral comparison

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)))

Average Formula error

I am trying to work with an average formula, that includes a few other average formulas within.
The results of my formula are either a numerical value, or 'FALSE'.
When I highlight the 8 values I get the correct average calculationin the example below result is -2.5. and when I use =AVERAGE(A2,A3,A4......A9) I get correct result as -2.5.
However, when I replace A2 within the Average formula with the formula within cell A2, I get a different result.
appreciate any help on this
The upper formula calculates average of -3 and -2 as it includes only the numbers.
The lower formula calculates average of -3, -2 and 0, as the formula that's included in it has a result of FALSE, which is equivalent of 0.
This might be easier to understand with an example.
There's 6 in cell B1, and simple ISBLANK() formula in the rest of the column.
B12 Formula: =AVERAGE(B1:B10)
C12 Formula: =AVERAGE(6;ISBLANK(B2);ISBLANK(B3);ISBLANK(B4);ISBLANK(B5);ISBLANK(B6);ISBLANK(B7);ISBLANK(B8);ISBLANK(B9);ISBLANK(B10))
First formula sees only the number 6 and ignores anything that looks like a text, second formula gets the value of FALSE ("0") before it becomes text and counts with it in the average.

INDEX/MATCH lookup_value referencing a cell that contains an index/match formula is giving a N/A error

When doing an INDEX/MATCH formula in cell H14 the lookup_value part of my formula references a cell(N5) that contains an IF/INDEX/MATCH formula. I know my formula is correct but it returns "N/A". It has something to do with the cell value it's looking up but I don't know what.
H14 formula is
=INDEX(OSARP!L6:L466,MATCH(Summary!N5,OSARP!H6:H466,0))
and it returns and N/A error.
N5 formula is
=IF($H$5="","",INDEX(Table_owssvr_1[GUUID],MATCH($H$5,Table_owssvr_1[Emp Name],0)))
I need it to use the result of N5 formula which is an ID number that was index/matched from another sheet.
Worksheet

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)

Resources