VLOOKUP keeps giving #N/A - excel-2010

I am using VLOOKUP to do some looking up and I have all the values right but it keeps giving me #N/A. Here is what I am doing:
I have a data in 2 columns, Column A has names and column B has ID. I have copy and pasted the some details further down the columns and that is what I am searching. It keeps giving me #N/A when the data it is search is the same data I pasted.
The formula I am using is as follows:
VLOOKUP(B10,A30:B46,1,FALSE)
Any ideas why this is doing it?
When I use TRUE instead it gives me a really wrong match. nowhere close

I found the answer therefore just updating it here.
You can get around the error by using INDEX and MATCH functions. Especially if it includes massive tables and multiple sheets.
I used the following to solve my issue and hope it helps others too.
=INDEX('Users activity volumes'!A7:A367,MATCH('MH Users'!B8,'Users activity volumes'!B7:B367,0))

Related

Index / Match - Receiving an error when trying to find entry

I am very fresh with Excel and still learning the basics. I came upon an issue I really need help with and couldn't find suitable solution online.
I have a column I keep on constantly updating with Bulk data THE COLUMN.
I'd like to see the most common entry and the least common entry for a specific time using this formula:
=INDEX('Data Input'!F433:F610,MODE(MATCH('Data Input'!F433:F610,'Data Input'!F433:F610,0)))
But once I try it, it constantly tells me:
Did not find value '' in MATCH evaluation.
I've tried with shorter ranges and It did work, so I guess once it runs through empty cell - it breaks. How can I modify this formula to function properly and print what I need?
And side question, is is possible to implement a calendar bar and choose between dates?
You can insert a clause to exclude blanks (assuming they are not to be considered a legitimate return):
=INDEX('Data Input'!F433:F610,MODE(IF('Data Input'!F433:F610<>"",MATCH('Data Input'!F433:F610,'Data Input'!F433:F610,{0,0}))))
Note that I have used
{0,0}
for MATCH's match_type parameter so that the formula will not error should there be more than one entry within your range which shares the highest frequency. In such cases, the above formula will return that which occurs first in your list.

Google Sheets DGET() does not find values

I have a fairly simple table, which looks like the following:
I want to get a specific value from that table. For that I am using two different formulas:
=iferror(DGET(Bazaar!$A:$K;"Top Sell-Offer";{"Item";"ENCHANTED_COAL"});"?") ==> returns "?"; Should get some numbers
=iferror(DGET(Bazaar!$A:$K;"Top Sell-Offer";{"Item";"ENCHANTED_OBSIDIAN"});"?") ==> returns "2747" as expected
I also tried =index(filter(Bazaar!$B:$K;Bazaar!$A:$A="ENCHANTED_COAL");;1)
which does return what I expected, but I can't specify the column I want by header.
Note that both strings for conditions and column headers are copy-pasted and thus character-perfect (As you can also see in the results.)
Also note that this does not happen with the truncated table provided, please refer to this sheet.
Why do I get such inconsistent results and what can I do about that?
Thanks in advance! Stay healthy!
I made a copy of your sheet and messed around with it. Finally, I decided to remove the IFERROR part and I got the error of "More than one match found in DGET evaluation.". The error was the key.
The formula is seeing "ENCHANTED_COAL_BLOCK" as another match for "ENCHANTED_COAL". Once I removed "COAL" from coal block, the formula worked as it should.
In order to get it to stop seeing double (to find an exact match), simply add an equal sign in front of the word you are looking for:
=IFERROR(DGET(Bazaar!$A:$K,"Top Sell-Offer",{"Item";"=ENCHANTED_COAL"}),"?")
=IFERROR(DGET(Bazaar!$A:$K,C$3,{$A$3;"="&$A5}),"?")
I recommend adding the equal sign in front of all words you search for just for consistency purposes.
Reference: https://infoinspired.com/google-docs/spreadsheet/exact-match-in-database-functions-in-google-sheets/

LOOKUP Function won't output correct value

I'm trying to create an Activity tracker for a game. However, I'm trying to use the LOOKUP function to track activity throughout 3 different sheets. However, the LOOKUP function does not seem to be outputting the correct value. LINK: https://docs.google.com/spreadsheets/d/1tdq6oeEFjgxJg6FXvSH2ZmkgRlHaFiD5aycjvezfNvc/edit?usp=sharing
If you look at Activity sheet, E2:E52, you should understand that it's outputting the wrong value(At least based on what I'm reading on the google docs).
I've tried converting this over to one sheet to see if that was the problem, however, it didn't work there either, I tried being more inclusive of the exact letter and number combination and that didn't help either.
I expect it to output the Attacks column for the username based on the Activity1 sheet.
Any help would be greatly appreciated.
PS: I tagged excel as it does the same exact thing on excel, however it gives slightly different values. I'm very confused.
use VLOOKUP instead:
=ARRAYFORMULA(IFERROR(VLOOKUP(D2:D,
{Activity1!C:D; Activity2!C:D; Activity3!C:D}, 2, 0)))

Is there a way to prevent duplicates in an array with stacked queries in Google Sheets?

I'm trying to create a simple sort feature in Google Sheets by having data validation drop-down lists and using an array of queries. I can get it to work but if a row matches more than one of the data validation drop down lists, then it will appear twice in the array.
I have tried using vlookup instead but don't really understand how that works as I can only find very specific examples. I have tried using "=ARRRAYFORMULA" and putting my queries inside there but that does not solve the issue either.
My cell currently is
={ IF(NOT(ISBLANK(B2)),
QUERY('App Data Sheet'!1:1006, " select * where B = '"&B2&"'", 0), "");
IF(NOT(ISBLANK(C2)),
QUERY('App Data Sheet'!1:1006, " select * where C = '"&C2&"'", 0), "")
}
where B2 and C2 are data validation cells in the active sheet.
You can view my Query Sheet here: https://docs.google.com/spreadsheets/d/1AgvDIjmn2tv9_zKj7o5MPYZ9CdX9mZ_tM66n5jp5NEY/edit?usp=sharing
I currently only have two drop-down lists but will want to add more later once I figure out the duplicates issue.
EDIT:
I know that you can use countif to see if there are duplicates in a range but I do not how to enter that into my code to prevent it from showing.
EDIT2:
Well, I figured it out. I simply needed to encapsulate my formula inside a =UNIQUE() function that I had not known about before. Hopefully, this post will still help someone else out.
Well, I figured it out. I simply needed to encapsulate my formula inside a =UNIQUE() function that I had not known about before. Hopefully, this post will still help someone else out.
Googling using the proper words is what made a big difference in finding a solution. Instead of saying that I wanted to prevent duplicates, I searched to only show unique rows.

Sum of referenced ranges in google spreadsheets

In Google spreadsheets, how do I find the sum of two ranges referenced from different spreadsheets
I want to use something like
=(IMPORTRANGE("keyofsheet1","A1:A100")+ IMPORTRANGE("keyofsheet2","A1:A100"))
and get the sum
Apparently, the above doesn't work. Any help would be appreciated :).
I have found an answer:
Arrayformula is what I was looking for. It basically applies the formula treating the range as a range, instead of as a single element. I still donot totally understand why this works. would be really happy if someone could explain this
I just used
ARRAYFORMULA((IMPORTRANGE("keyofsheet1","A1:A100")+IMPORTRANGE("keyofsheet2","A1:A100")))
and suddenly everything works as it should.
Shouldn't the + operator be conscious of the input type it is getting and automatically respond by returning the appropriate type? why do I need to explicitly specify that this is an array formula
I ran into a similar issue yesterday. Solution was:
=SUM(IMPORTRANGE("keyofsheet1","SheetName!A1:A100")) + SUM(IMPORTRANGE("keyofsheet2","SheetName!A1:A100"))
No need to use ARRAYFORMULA()
2 important notes.
You will probably see a #REF! error in your cell with a red color in the corner. You'll need to hover over it and allow access to the spreadsheets that you're referencing.
If any of the original data in the spreadsheet ranges you're referencing in A1:A100 contain errors such as
#NULL!
#DIV/0!
#VALUE!
#REF!
#NAME?
#NUM!
#N/A
then your formula must be modified to include SUMIF() as follows
=SUMIF(IMPORTRANGE("keyofsheet1","SheetName!A1:A100"), ">0") + SUMIF(IMPORTRANGE("keyofsheet2","SheetName!A1:A100"), ">0")
This ensures that it's only adding anumbers and not error codes.

Resources