Google spreadsheet -- how do I sum up my wages in this spreadsheet? - google-sheets

I am trying to calculate my earnings on a Google Spreadsheet but have no idea what I am doing. I got this far with spreadsheets, but VLOOKUP returns a #N/A error and I can't calculate the sum in column B5. What am I doing wrong? Here's my spreadsheet:
https://docs.google.com/spreadsheets/d/1bsbQ4_0cITvdTqWWdX-Et1fiTL9Qw3WD_aminlpqgwY/edit?usp=sharing

The error message #N/A is caused by the VLOOKUP operation in cell D9. It is looking up cell C9, which is blank. There must be a value in a VLOOKUP operation. If you want to make this message go away, either put a value into C9 or use the IFERROR function. This only gives a value if the output is not an error. In cell D9, you can put this formula:
=IFERROR(VLOOKUP(C9,$C$2:$D$5,2,FALSE)). This should return nothing if there is an error.

Related

how to fix Lookup function error #N/A on google sheet

I have an issue error #N/A Message with VLOOKUP and LOOKUP function, as it is shown on the image I can't find out where is the error, can you help me guys
The value you look up must be found in the first column of the vlookup range.
You can try reordering the columns in an virtual array. For the highlighted cell (in the image you shared) that would make the formula:
=VLOOKUP("5f8961ec", {$K$2:$K$26, $J$2:$J$26}, 2, false)
Of course, you can also replace the value '5f8961ec' with a cell reference.
use in E1 after you delete everything in it:
=INDEX(IFNA(VLOOKUP(A1:A, {K2:K, J2:J}, 2, )))

ARRAYFORMULA VLOOKUP with ISBLANK in google sheets

I am trying to get a VLOOKUP to work on an entire column (minus the header), but I want blank entries if the column I am searching for is empty. I tried both these formulas, but to no avail (I still get the N/A in empty cells):
=ARRAYFORMULA(IF(ISBLANK(VLOOKUP(O2:O,Sheet1!B:C,2,FALSE)),"",VLOOKUP(O2:O,Sheet1!B:C,2,FALSE)))
=ARRAYFORMULA(IF(O2:O<>"",VLOOKUP(O2:O,Sheet1!B:C,2,FALSE)),"")
This is a slightly more complicated way than what I got working in another part of my sheet, which is the same without the VLOOKUP:
=ARRAYFORMULA(IF(ISBLANK(J2:J),"",J2:J))
Any ideas what am I doing wrong?
If you want to leave a blank instead of #N/A in a cell, you can use =IFERROR.
Like this:
=IFERROR(Your_formula, "value if the formula returns an error")
Since you are using ARRAYFORMULA, the iferror must be inside it
=ARRAYFORMULA(IFERROR(VLOOKUP(O2:O,Sheet1!B:C,2,FALSE),""))

Google spreadsheet Multiple result with VLOOK UP

The VLOOKUP formulas which works individually are
=if(VLOOKUP(E2,DB!$C:$E,1,0)>0,"COMPLETED",)
=if(VLOOKUP(E2,DB!$F:$H,1,0)>0,"IN PROGRESS",)
The issue is while displaying both results in a single cell, the formula which I came up for this was
C2=if(AND(VLOOKUP(E4,DB!$C:$E,1,0)>0),"COMPLETED",if(VLOOKUP(E4,DB!$F:$H,1,0)>0,"IN PROGRESS","UNDEFINED"))
I have tested the formula with normal conditions other than VLOOKUP and it works without any issues, not sure what's wrong with it.
Example : C10=if(AND(E10=1),"ONE",if(E10=2,"TWO","NO DATA"))
Any help appreciated.
May be its something simple but I am pulling my hair out for the last 3 hours.
Thanks :)
/-----------------------/
Updated 03.05.2016
Sorry for the comments that I have posted as I am new at using Stack overflow.
I have tried with only IF statements without any AND conditions, but the result is still same. The VLOOKUP is not returning the second value.
C15=IF(VLOOKUP(E15,DB!$F:$H,1,0)>0,"COMPLETED",if(VLOOKUP(E15,DB!$F:$H,1,0)>0,"IN PROGRESS","UNDEFINED"))
What I am expecting in cell C2 (sheet1) is check the values in cell
E2 against the columns C:H ( Sheet 2/ DB). If it belongs to
Column C:C in (sheet2/DB) then the value in C2 (sheet1) should display
as "Completed" else if the value is in column F:F ( sheet2/DB) then in C2
(sheet1) should display "In Progress".
Link to my spreadsheet link
There are a few problems with your formula.
VLOOKUP and similar functions search within a single row or column, and it seems like you're looking for your value in multiple rows and columns.
As #Meta mentioned, VLOOKUP returns N/A when the value is not found in the range, and you are expecting a zero or less value to be returned (when you check for >0 in the IF statement). Note that VLOOKUP returns the cell value itself and not an index of a match (like the MATCH function).
My suggestion is to replace your VLOOKUPs with COUNTIF.
=IF(COUNTIF(DB!$F:$H,E2)>0,"COMPLETED",IF(COUNTIF(DB!$C:$D,E2)>0,"IN PROGRESS","UNDEFINED"))
COUNTIF counts in multiple rows and columns, and will return a zero if no matches are found.

Using arrayformula() like continue with nested if()

My goal is to fill down formula while data exist in an adjacent column.
Here is my original formula:
=index(lookups!$M$2:$M30,match($A3,lookups!$N$2:$N30,0))
This formula works in that results are returned as expected.
I then tried this in the hope of it copying down:
=index(lookups!$M$2:$M30,match($A3:A,lookups!$N$2:$N30,0))
This resulted in #N/A "Did not find value in match"
Then I read this post and looked at the second most voted answer and tried editing my formula to this:
=arrayFormula(index(lookups!$M$2:$M30,match($A3:A,lookups!$N$2:$N30,0)))
This time the formula copy down as I hoped, but with a #VALUE error "Function IF parameter 1 expects boolean values. But 'ADT- Alaska Travel Vendor Activities (Search)' is a text and cannot be coerced to a boolean."
How can I tell sheets to copy the index(Match()) all the way down while data exist in column A?
See if this formula delivers the desired output ?
=ARRAYFORMULA(iferror(vlookup(A3:A, {lookups!$B$2:$B, lookups!$A$2:$A}, 2, 0)))

Make countif ignore "- -" from continue

I'm having trouble with a countif that I am using to count the number of entries in a range. The problem is that the range is populated with an array formula, and when the data changes the cells the array formula added a =CONTINUE(...) to now display -- (minus minus)
=COUNTIF(C6:C, "<>")
Is there a way that the countif could be written to ignore cells with --?
The -- is a way that Google Sheets displays the #VALUE! error. So you can use the IFERROR function to "mask" any of these errors:
=ArrayFormula(COUNTIF(IFERROR(C6:C);"<>"))
or more simply:
=ArrayFormula(COUNTA(IFERROR(C6:C)))
Updated:
Why don't you filter out all cells that are not text or similar to --?
Then use filtered range for countif.
=COUNTIF((ROWS(C6:C)-COUNTIF(C6:C"<>*")) , "ur criteria")
Is there a way your formula array could cast a string other than --?
Check this article
The search you are doing has regular expression.
Writing this on mobile. So please try out and pardon for weird formatting.

Resources