I have two Excel sheets, and each one has a column with e-mail addresses in them. I am trying to write a formula that checks one sheet to see if that e-mail address is already located there. If so, it returns "Yes". If not, it returns "No". This is the formula I am using.
=IF(ISERROR(FIND(F2,'Group Contacts 2014'!F:F)),"No",IF(F2<>"","Yes","No"))
F2 is the e-mail address I am checking, and 'Group Contacts 2014'!F:F is the column of e-mail addresses I am checking it against in the other sheet.
This formula is currently returning false negatives. For example, I have an e-mail address in both sheets but it is returning "No" for it. Any ideas on what is going awry?
According to this documentation FIND locates a substring within a larger string. So it's not really a good choice when you want to search multiple cells.
FIND(find_text, within_text, [start_num])
I think you are looking for MATCH, which looks to see if a specified value appears in a particular range. Note that you probably want to specify match_type = 0 in order to force the function to only accept exact matches.
MATCH(lookup_value, lookup_array, [match_type])
Related
All I want to do is verify an exact phrase in a cell--over multiple columns--is present in another column cell.
For instance, say I had three name columns and one email column. I want to be able to write a function that looks over a row in the three name columns and, if that same row in the email column contains any of the exact phrases in the name columns, it will return true. Otherwise, return false. In this case, I basically just want to see if the email address has any of those exact names in it that the name columns have in its row.
The vlookup function, to my understanding, only lets you use one column in the lookup_value argument. Is there any way to look over multiple columns in there?
I appreciate any and all guidance.
I have an ugly solution for you.
=IF(OR(ISNUMBER(FIND(B1,A1)),ISNUMBER(FIND(C1,A1)),ISNUMBER(FIND(D1,A1))),True,False)
Screen Cap, since I can't embed images yet apparently.
The Find functions break the logic for the OR function, so the ISNUMBER function takes the #VALUE! and return False. I would have preferred COUNTIFS, but the wildcard search that worked with COUNTIF broke under COUNTIFS, so I went a different direction.
I have a couple of different large lists of equipment on seperate worksheets I am trying to consolidate. The first sheet "List" contains multiple columns of information, including one for the area it will be relocated to. Another sheet, "Locations," contains the three areas where each piece of equipment will be relocated to, seperated in to 3 columns; at the top of each column are the names of the locations 2500, 2900, and Term. The issue is, the Equip# from the "List" sheet only partially matches the names on the "Locations" sheet.
List
Locations
As you can see above, A2203-76 under Equip# only partially matches A2203-76 20% NAP TANK AGITATOR.
This is the formula I am using {=INDEX(Locations!$A$2:$C$2,,MIN(IF(Locations!A3:C151="A2203-76",COLUMN(Locations!A:C),0)))}. This unfortunately will only return the first column value, which is 2500. What should happen is: First, on the List sheet, the New Gear Location cell should check the Equip# cell in the same row, after retrieving the Equip# it should go to the Locations sheet and search for a partial match to what it retrieved from the Equip# cell. After finding a partial match, it should look at the column the match was found in and return one of the 3 cell values from the top "2500, 2900, or Term" based on what column it was found in and fill this value in the cell on the List page that the formula was entered in to.
Another issue, which makes me think this may not be possible, is there are also instances of A2203-75. So I question if excel has the ability to apply I guess "weights" to different partial matches. What I am getting at is, if I applied some function to partially match A2203-76 to something on the other page, would it just stop at A2203 and pick the A2203-75? Or would it look at the whole string first and find the correct instance? Maybe my thinking is wrong, but if you could offer any help I would appreciate it.
Is this what you mean?:
=INDEX(Locations!$A:$B,MATCH(List!$A2&"*",Locations!$C:$C,0),COLUMNS($A:A))
Paste this formula in List!B2 and drag right, down.
It searches for your search text followed by wildcard *.
!! Please note that this will return the first match.
If you are searching for A2203-76 and your data also contains A2203-761 it will return this value if it's found prior to A2203-76 !!
I'm trying to find a way to perform an INDEX MATCH lookup that goes beyond the first match to check if all matching values are equivalent. I've found formulas that will return all matches, but what I'd like to do is have the matching value returned in the formula cell, but only if all values returned are the same.
Here's an example:
I'm matching the report number with the report number below and only picking up the area value if all report-area combinations are the same. Is there a clean way to do this?
Dan.
My solution may seem a bit messy, but you can make it simpler as you go, once you start implementing it:
First, I made a Report Count. (How many 12345 Reports are there in total, and so on).
=COUNTIF($A$2:$A$10;A2)
Then, I concat the Report-Area to get a unique identifier for every Report-Area combination.
=A2&"-"&B2
Now, I make a Count of that column, meaning I count how many combinations are there for each case (e.g. how many 12345-2C are there in total).
=COUNTIF($D$2:$D$10;D2)
Then, I create an "Ok" Column for checking if the Report Count matches the Concat Count.
=IF(C2=E2;"OK";"")
That said, we have our table ready for checking what you're looking for.
In just one formula (the one under Lookup header) on cell B13:
=IF(INDEX(F2:F10;MATCH(A13;A2:A10;0))="OK";INDEX(B2:B10;MATCH(A13;A2:A10;0));"")
I check IF there's an "OK" on the OK column for that Report number.
If there is, I Search for the "Area" value for that Report number.
If there isn't an "OK", I leave a blank cell. (In your example, it's #N/A)
The formulas on H2, I2 and C13 are just for reference. Plain text.
Again, I know it seems messy, but if you're not too familiar with some Excel formulas and functions, this is a good way to learn and build complex formulas step by step (Just as our fellow n8 said)
I assume you understand how INDEX MATCH works. If you don't, I'll edit an explanation for you.
Good Luck!
The vlookup function appears to be broken. It is returning the same value for all lookups, but it should not.
I have it set like so:
=VLOOKUP(A3, Asset_Mapping!A$2:B$673, 1)
Where the lookup value is in the B column and the result is in the A column.
I use the $ so the rows are not auto-updated to A3:B674 etc as I paste the formula down the rows. However, even if I manually enter that formula into the next row, it is not finding the correct value.
IF i remove the "$", the correct values are found for the first rows where the values fall within the modified range (e.g. Asset_Mapping!A3:B674) but eventually as expected it stops finding the values as the range is invalid.
What am I doing incorrectly here? I have formulas set to auto-calculate.
Without testing on your actual data it's hard to confirm this will work but add the false parameter. This will find exact matches and not the first partial match.
=VLOOKUP(A3, Asset_Mapping!A$2:B$673, 1, false)
Collating the points together and clarifying the formula
Parameter 1: The value you are looking for
Parameter 2: The table with the data. First column is the value you are looking for.
Parameter 3: The column number of the value you want to show.
Parameter 4: If you want an exact match or partial match.
#Jeeped made the point of ordering data to get more reliable results. Good advice.
Andres has the right idea, but there is a faster way to fix the problem.
If it is returning the same value over and over again for your whole range, you probably have your Calculation Options set to "Manual".
Go into Formulas on the top ribbon and choose Calculation Options. There, you can change your calc method to "Automatic".
Also lookup value must be in first column.
Where the lookup value is in the B column and the result is in the A column.
VLOOKUP always lookup in the left-most column and returns a value from the column number specified. If you want to reverse the lookup/return order then use INDEX(..., MATCH(...))
=INDEX(Asset_Mapping!A$2:A$673, MATCH(A3, Asset_Mapping!B$2:B$673, 0))
Note that you were using a sorted, binary lookup; I've changed this to an exact match lookup which does not require sorted data.
Just in case adding a solution to this topic.
Don't know why in big tables Vlookup and Index+Match tend to show just the value of the first result in all the other cells.
In my case to fix this, after I've copied the formula in the whole range, I choose any cell containing it, press F2 and then Enter. It kind of forces excel to process everything.
I've been working on this for a week with no results. I've created this same spreadsheet for another apartment community without any issues, but for some reason, I cannot get the proper results in this spreadsheet. I've tried vlookup as well, but that didn't help either. any more advice?
Formula
Result and lookup vectors
I have a spreadsheet that is stored in a shared location on a website that I need to do a Vlookup on in order to gather certain data. In order to test I have a Workbook stored in my documents. I have some VBA in this workbook but this does not affect the data in question.
The Formula that I am attempting is
=VLOOKUP("activated",$A4,4,TRUE)
What I need to do is to pull data from several columns in this sheet but I have not used Vlookup in a long time so I am trying to start small. I have formatted all of the cells to general but this has not helped.
I have also tried
=VLOOKUP("activated",$A2:$A71,4,TRUE)
However I constantly get the #REF error
Putting the following will return Activated so I know that in principal the formula is correct
=VLOOKUP("activated",$A2:$A71,1,TRUE)
I have looked at the answer submitted in Excel VLOOKUP #REF Error but this has not resulted in the correction of my errors
Any help would be greatly appreciated
The third argument is the column that you want to return... As there is only 1 column in the range $A2:$A71 you can't put 4 as the argument...
You probably need =VLOOKUP("activated",$A2:$D71,4,TRUE)
Also you should probably use FALSE for your last argument, as this can return the next closest match, if you use TRUE.
Range_lookup A logical value that specifies whether you want VLOOKUP to find an exact match or an approximate match:
http://office.microsoft.com/en-gb/excel-help/vlookup-HP005209335.aspx