This doesn't error, it just gives me "FALSE" as a result. I'm thinking I can't do a vlookup from two different sources, but want to verify? If not, suggestions for an alternative? Thanks!
=IF(ISBLANK(A69),"",IF(ISNA(VLOOKUP(A69,sheets!J:J,1,FALSE)),IF(ISNA(VLOOKUP(A69,Lines!B:B,1,FALSE)),"No Match",IF(VLOOKUP(A69,sheets!J:J,1,FALSE),"Matches sheet",IF(VLOOKUP(A69,Lines!B:B,1,FALSE),"Line","No Match")))))
Which do you want to check first? Perhaps try MATCH as you only seem to want to verify the presence of a match, i.e.
=IF(A69="","",IF(ISNA(MATCH(A69,sheets!J:J,0)),IF(ISNA(MATCH(A69,Lines!B:B,0)),"No Match","Line"),"Matches sheet"))
That will show "Matches sheet" if A69 is found in both sheets, if you don't want that then reverse the order of the MATCHES/text.
...or use COUNTIF
=IF(A69="","",IF(COUNTIF(sheets!J:J,A69),"Matches Sheet",IF(COUNTIF(Lines!B:B,A69),"Line","No Match")))
You'd probably be better off doing each lookup in separate cell across the row. You could also use MATCH rather than VLOOKUP. There shouldn't be a problem with what you are doing other then incorrect nesting.
You may want to drop the ISNA tests and instead try wrapping all of your VLOOKUPS in NOT(ISERROR(...)). The formula I got is:
=IF(ISBLANK(A69),"",IF(NOT(ISERROR(VLOOKUP(A69,sheets!J:J,1,FALSE))),IF(NOT(ISERROR(VLOOKUP(A69,Lines!B:B,1,FALSE))),"No Match",IF(NOT(ISERROR(VLOOKUP(A69,sheets!J:J,1,FALSE))),"Matches sheet",IF(NOT(ISERROR(VLOOKUP(A69,Lines!B:B,1,FALSE))),"Line","No Match")))))
This formula produced a result of "Matches sheet" in my very limited test. You should check whether it produces the result(s) you are looking for with your data set.
Related
I have this formula that works great to pull all uc's for a given actor.
=INDEX(uc_name, SMALL(IF(ISNUMBER(MATCH(actor,$A$2,0)), MATCH(ROW(actor),ROW(actor)),""), ROWS($A$4:A4)))
But right now its only pulling results if the cell contains only 'Actor x' where some cells might actually have multiple Actors written into the cell. Anyway to modify this formula to return values whenever the actor is included in the cell?
Hoping I don't have to start over and use a different formula altogether since this is driving a bunch of other things on the workbook- I just now realized its not grabbing those 'contains' ones though.
Thanks in advance!
I think you want:
=INDEX(uc_name,AGGREGATE(15,7,(ROW(actor)-MIN(ROW(actor))+1)/(ISNUMBER(SEARCH($A$1,actor))),ROW($ZZ1)))
Or if one has the Dynamic Array Formula FILTER():
=FILTER(uc_name,ISNUMBER(SEARCH($A$1,actor)))
Add a wildcard to your match:
=INDEX(uc_name, SMALL(IF(ISNUMBER(MATCH("*"&actor&"*",$A$2,0)), MATCH(ROW(actor),ROW(actor)),""), ROWS($A$4:A4)))
I have been working on this issue for over two hours and I am beginning to question my sanity. I have used vlookup many times in the past, but now it is just not working as expected. I am trying to replicate a LEFT-JOIN (from SQL) in Excel using vlookup.
Here is the formula I am using on cell G2:
Here is the table of all the values I want to lookup values for.
Here is the table I am using as a reference:
I am only searching one column to simplify the example. Cell G2 contains the formula which is applied to the cells under it as well. As you can see from the first image, not only is it not matching but there is some pretty weird behavior going on.
I have removed duplicates for both tables.
I have unformatted the data to plain text values
I have tried this formula on three different computers
Regardless, I keep kept getting the same result! I am starting to lose sanity.
Does anyone have any idea?
Thank you
If you want exact matches, you should be using FALSE as the last parameter
The lookup table must be sorted in ascending order. Cell A369 appears to have a value lower than the row before it, A368. There are several instances of "lower" values occurring after a higher value.
Before you go insane, consider sorting the range $A$368 thru $A$679, and see if that makes a difference.
Otherwise, time to ditch VLOOKUP, and use instead INDEX and MATCH.
Sometimes you can get the #N/A error if your lookup_value isn't "clean". If that's the case, try this formula:
=VLOOKUP(TRIM(CLEAN(A2)),$A$368:$A$697,1,FALSE)
Additionally, your table_array may have "unclean" data, so you'll need to scrub that first before you're able to find a match. To do that, use this array formula, committing it with Ctrl + Shift + Enter:
=VLOOKUP(A2,TRIM(CLEAN($A$368:$A$697)),1,FALSE)
Have you tried doing a MATCH? does it need to be VLOOKUP?
if you are happy using match try:
=IF(MATCH(A2,$A$368:$A$697,0),A2,"NO MATCH")
First post, but I am stuck and was hoping for some help. What I am trying to do is use a nested IF formula to determine whether the value returned by a VLOOKUP matches specific text on another sheet in the same workbook. If it does, to then use the COUNTIFS function to determine the sum of instances that specific text contained in a specific cell appears on another sheet (also in the same workbook).
One part of these formulas seems to work, but when I combine it with others, it errors and I can't figure out why.
It's probably something simple, but I'd appreciate any help. Here's the part that seems to "work"
=IF(VLOOKUP($A3,'Sheet1'!$B:$D,3,FALSE)="All",
(COUNTIFS('Sheet2'!$U:$U,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")
+
(COUNTIFS('Sheet2'!$R:$R,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")))
If I put one more parenthesis, it works as is, but seems to omit some of the "All" Vlookup results... thus why I put works in quotations above. That might be an issue with my spreadsheet though, but felt I should include in case I'm just being idiotic. Regardless, when I input two additional IF statements, it errors.
The final formula I've crafted looks like this (double spaced for ease of reading only):
=IF(VLOOKUP($A3,'Sheet1'!$B:$D,3,FALSE)="All",
(COUNTIFS('Sheet2'!$U:$U,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")
+
(COUNTIFS('Sheet2'!$R:$R,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")))),
IF((VLOOKUP($A3,'Sheet1'!$B:$D,3,FALSE)="One",
(COUNTIFS('Sheet2'!$U:$U,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")),
IF((VLOOKUP($A3,'Sheet1'!$B:$D,3,FALSE)="Two",
(COUNTIFS('Sheet2'!$R:$R,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY"),
IF((VLOOKUP($A3,'Sheet1'!$B:$D,3,FALSE)="Three",
(COUNTIFS('Sheet2'!$U:$U,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")),"0"))
Any ideas?
Thanks!
Ryan Olson
Just cleaned up some bracketing. Let me know how it goes as I didn't alter the formula otherwise.
=IF(VLOOKUP($A3,Sheet1!$B:$D,3,FALSE)="All",
COUNTIFS(Sheet2!$U:$U,Sheet3!$A3,Sheet2!$C:$C,"MM/DD/YYYY")+(COUNTIFS(Sheet2!$R:$R,Sheet3!$A3,Sheet2!$C:$C,"MM/DD/YYYY")),
IF(VLOOKUP($A3,Sheet1!$B:$D,3,FALSE)="One",
COUNTIFS(Sheet2!$U:$U,Sheet3!$A3,Sheet2!$C:$C,"MM/DD/YYYY"),
IF(VLOOKUP($A3,Sheet1!$B:$D,3,FALSE)="Two",
COUNTIFS(Sheet2!$R:$R,Sheet3!$A3,Sheet2!$C:$C,"MM/DD/YYYY"),
IF(VLOOKUP($A3,Sheet1!$B:$D,3,FALSE)="Three",
COUNTIFS(Sheet2!$U:$U,Sheet3!$A3,Sheet2!$C:$C,"MM/DD/YYYY"),"0"))))
I have the following sheet structure:
What I need to find out is, whether code 8101-1101 contains any Matching Projects (in our case 9500-1100). I have tried VLOOKUP formula, however that only works if the matching project is set to the very first item. If matching project exists only somewhere in the middle, then the formula fails. I have also tried SUMIF yet with no luck.
What formula do I need to use, to check this particular example?
As we discussed in the comments, the easiest way to accomplish what you're looking to do would be using the COUNTIFS() function.
Given your example, your final formula would be as follows:
=COUNTIFS(B:B,B2,I:I,"<>")
Good luck and glad it ended up working for you!!
Is it possible to use the COUNTIF function - or any other function - to find all values which aren't equal to "yes" or "no" values?
I am able to use COUNTIF to locate all "yes" and "no" answers (also also all blank cells), but I want to extract the "dirty" data from some survey results and include it in the "Missing" total.
I have tried to search for all values that are not equal to "yes" or "no" (by way of using the NOT function), but this failed to work.
Can this be done?
UPDATE:
Please note that I also suspect that COUNTIFS could do the trick, but am unsure exactly how to lay the function out.
=COUNTIFS may be best (if available) but with =COUNTIF I'd suggest:
=COUNTA(A:A)-COUNTIF(A:A,"Yes")-COUNTIF(A:A,"No")-COUNTIF(A:A,"=""").
If you are counting yes and no anyway then you could use the results from elsewhere in place of parts of the above formula.
You should use COUNTIFS instead since you need multiple criteria.
Try using "<>yes" and "<>no" for the criteria for COUNTIFS.
Something like
=COUNTIFS(A1:A5,"<>yes",A1:A5,"<>no")