I have a range of cells in column I2:I8:
WILEY
ELSEVIER
SPRINGER
TAYLOR
SAGE
OXFORD
CAMBRIDGE
I want to use the SEARCH function on column G, so that it'll search for any one of the values in this range, and return true/false to column H if it finds anything.
The problem is, that the values in column G are also longer, and the string in column I will only be a substring of the column G text.
Column G contains (for example):
BLACKWELL PUBL LTD
ISRAEL MEDICAL ASSOC JOURNAL
PERGAMON-ELSEVIER SCIENCE LTD
PERGAMON-ELSEVIER SCIENCE LTD
MOSBY, INC
OXFORD UNIV PRESS
CELL PRESS
AMER COLL PHYSICIANS
NATURE PUBLISHING GROUP
COLD SPRING HARBOR LAB PRESS, PUBLICATIONS DEPT
AMER COLL PHYSICIANS
MASSACHUSETTS MEDICAL SOC
WILEY-BLACKWELL
BLACKWELL PUBLISHING INC
AMER ASSOC ADVANCEMENT SCIENCE
OXFORD UNIV PRESS
MASSACHUSETTS MEDICAL SOC
OXFORD UNIV PRESS
ACADEMIC PRESS INC ELSEVIER SCIENCE
ACADEMIC PRESS LTD- ELSEVIER SCIENCE LTD
So for examples, each time the word Wiley, Oxford, Elsevier etc appear in column G (such as in OXFORD UNIV PRESS or WILEY-BLACKWELL or ACADEMIC PRESS INC ELSEVIER SCIENCE), it will return true in column H.
I have build the following functions:
=(ISNUMBER(SEARCH(($I$2:$I$8),G2)))
=(ISNUMBER(SEARCH(($I$2:$I$2:$I$3:$I$3:$I$4:$I$4:$I$5:$I$5:$I$6:$I$6:$I$7:$I$7:$I$8:$I$8),G23)))
But they do not seem to work.
Any suggestions?
Example of wanted result:
BLACKWELL PUBL LTD FALSE WILEY
ISRAEL MEDICAL ASSOC JOURNAL FALSE ELSEVIER
PERGAMON-ELSEVIER SCIENCE LTD TRUE SPRINGER
PERGAMON-ELSEVIER SCIENCE LTD TRUE TAYLOR
MOSBY, INC FALSE SAGE
OXFORD UNIV PRESS TRUE OXFORD
CELL PRESS FALSE CAMBRIDGE
AMER COLL PHYSICIANS FALSE
NATURE PUBLISHING GROUP FALSE
AMER COLL PHYSICIANS FALSE
MASSACHUSETTS MEDICAL SOC FALSE
WILEY-BLACKWELL TRUE
BLACKWELL PUBLISHING INC FALSE
AMER ASSOC ADVANCEMENT SCIENCE FALSE
OXFORD UNIV PRESS TRUE
MASSACHUSETTS MEDICAL SOC FALSE
OXFORD UNIV PRESS TRUE
ACADEMIC PRESS INC ELSEVIER SCIENCE TRUE
ACADEMIC PRESS LTD- ELSEVIER SCIENCE LTD TRUE
NATURE PUBLISHING GROUP FALSE
ELSEVIER SCIENCE BV TRUE
MOSBY-ELSEVIER TRUE
MASSACHUSETTS MEDICAL SOC FALSE
Wrap your formula in SUMPRODUCT()
=SUMPRODUCT(--ISNUMBER(SEARCH($I$1:$I$7,G1)))>0
Related
I have an excel file with 2 different sheets. In one i have a list of cities, in the other one i have all the trains that go in that specific city. I have linked the city's name cells with the corresponding in the list. If i add another city and reorganize the list in alphabetic order the trains sheet will have the city's names all changed. How can i connect the content of two different cells so that if i reorganize the list the names in the trains sheet will not change? I looked gor a solution in the official microsoft forum but i didn't find anything
I'm using VLOOKUP() function and it works
In CITIES-STATIONS.xlsx file I'm taking 3 columns as array I'm
getting the column 3 to show in Trains.xlsx file
I added Florida City and is taking the value of the station the formula is in the Trains.xlsx file:
=VLOOKUP(B2,'[1-CITIES-STATIONS.xlsx]Stations'!$A$1:$C$44,3,FALSE)
=VLOOKUP(Searching Value, Array ,Column to get in to the Trains File, Bolean Value in case null)
1-CITIES-STATIONS.xls file
A B C
City State Station Name
Alpine TX (ALP)
Alton IL (ALN)
Arkadelphia AR (ARK)
Austin TX (AUS)
Benson AZ (BEN)
Bloomington IL Uptown Station (BNL)
Carlinville IL (CRV)
Chicago IL Union Station (CHI)
Cleburne TX (CBR)
Dallas TX Union Station (DAL)
Del Rio TX (DRT)
Deming NM (DEM)
El Paso TX Union Depot (ELP)
Florida MI Amtrak Florida <------
Fort Worth TX (FTW)
Hope AR (HOP)
2-TRAINS.xls file
A B C
Train Company City Station
Amtrak. Malvern (MVN) <---formula here
Amtrak. Arkadelphia (ARK)
Amtrak. Palm Springs Amtrak Station (PSN)
Amtrak. Florida Amtrak Florida <------
Norfolk Southern Railway. Hope (HOP)
Norfolk Southern Railway. Texarkana (TXA)
Norfolk Southern Railway. Marshall (MHL)
Norfolk Southern Railway. Longview (LVW)
Norfolk Southern Railway. Mineola (MIN)
Union Pacific Railroad. Dallas U.S. (DAL)
Union Pacific Railroad. Fort Worth (FTW)
Union Pacific Railroad. Cleburne (CBR)
Union Pacific Railroad. McGregor (MCG)
Union Pacific Railroad. Temple (TPL)
Union Pacific Railroad. Taylor (TAY)
BNSF Railway. Austin (AUS)
Good luck!
I have range with IATA codes in $B$2:$B$3591 and destination names with IATA codes in $A$2:$A$3591. I would like to search for IATA code based on values in range $A$2:$A$3591. The problem is that I can't use exact match as exact text can't be entered.
For example if I type Bromma, formula should display BMA. If I type Arlanda, formula should display ARN and etc.
A B
Stavropol, Russia (STW) STW
Stavanger, Norway (SVG) SVG
Stella Maris, Bahamas (SML) SML
Stockholm, Sweden - All airports (STO) STO
Stockholm, Sweden - Arlanda (ARN) ARN
Stockholm, Sweden - Bromma (BMA) BMA
Stornoway, United Kingdom (SYY) SYY
Storuman, Sweden (SQO) SQO
Strasbourg, France - Bus service (XER) XER
Strasbourg, France - Entzheim (SXB) SXB
Stronsay, United Kingdom (SOY) SOY
Stung Treng, Cambodia (TNX) TNX
I have tried =VLOOKUP(E3&"*";$A$2:$B$3591;2;FALSE) so that in E3 I type Bromma but it does not work. However this works for Stavropol for example.
E3$"*"
Will only match the begining of the the text. Add another wild card for the start:
"*"&E3&"*"
To Match on text anywhere in the string.
and sorry if this question looks familiar, I saw a lot of similar problems but couldn't understand the trick, and I completely stuck.
I have a spreadsheet with 2 columns :
A with Countries
B with their code
A B
Belgium BE
England EN
France FR
Luxembourg LX
Netherlands NL
Spain SP
I'm trying to generate generate a matrix representing all the possible travels : Travel from A to A, from A to B, from B to A, and from B to B. The only restriction is not to travel from a country to itself.
At the end I want to generate the result in a single column C, like this :
Travel from Belgium to England Travel from Belgium to France
Travel from Belgium to Luxembourg Travel from Belgium to
Netherlands Travel from Belgium to Italy Travel from Belgium
to Spain Travel from England to Belgium Travel from England to
France Travel from England to Luxembourg Travel from England
to Netherlands Travel from England to Italy Travel from
England to Spain etc Travel from Belgium to EN Travel from
Belgium to FR Travel from Belgium to LX Travel from Belgium to
NL etc Travel from BE to EN Travel from BE to FR
Travel from BE to LX etc Travel from BE to England Travel
from BE to France etc
Can anyone help me with that ? I tried several tricks with concatenation and JOIN, but I don't get anywhere ...
Thanks a lot in advance
You can run through each value in column A and associate it with a staggered value from column B but you will have to perform some mathematical trickery using the INT function and MOD function to have the sixth entry in column A associated with the first entry in column B.
The formulas in C2:E2 are,
=INDEX(A$2:A$7, INT((ROW(1:1)-1)/(COUNTA(A$2:A$7)-1))+1)
=INDEX(B$2:B$7, MOD(MOD((ROW(1:1)-1), (COUNTA(B$2:B$7)-1))+INT((ROW(1:1)-1)/(COUNTA(B$2:B$7)-1))+1, COUNTA(A$2:A$7))+1)
="Travel from "&C2&" to "&D2
There may be a more elegant way of looping through the destinations while skipping the origin but this works and it is not calculation intensive despite the apparent complexity of the formula(s).
I've used the COUNTA function to determine the number of entries rather than hard-code in ordinal numbers. You should be able to transcribe this for more or less entries by following and modifying the referenced cell ranges.
Got a bit of a pain. So got an interesting issue, basically. Have a long list of entities (200 plus) and I need to match them against a code which I have in another list. So from the entity list, I have the name and country of the entity (Name in column A, country in column D), I need to populate Column F with the code from the other list, or add unknown if a code cant be found.
So, tried to build the query by using the & operator
So =MATCH(A2&D2 to use as key, giving me a value like 'cool companyUNITED KINGDOM'.
In the second list (imported to sheet 2) contains the following columns
Code Name Country
So I want to search an array where Name and country have been combined:
=MATCH(A2&D2,Sheet2!B2:B99999&Sheet2!C2:C99999,0)
I then try to get the index back, so my complete list looks like
=INDEX(Sheet2!A2:C99999, MATCH(Sheet2!A2&Sheet2!D2,Sheet2!B2:B99999&Sheet2!C2:C99999,0))
And all I get back is #Value
Any suggestions
Edit: More infor
So sheet one looks like this (Its column C I need to populate from the code in column A, sheet two)
Entity name Status GIIN Country
Ben Dist Ltd NFFE N/a UNITED KINGDOM
Karamara Sdn Bhd PFFE N/a MALAYSIA
Farbion Trade (Curacao) N.V. LFFI N/a
Tentorim (International) B.V. LFFI N/a NETHERLANDS
Catamo B.V. TLTD N/a NETHERLANDS
Ben Dist Deutschland GmbH FLTD N/a GERMANY
Ben Dist Investments B.V. PFFE N/a NETHERLANDS
Ben Dist Limited TLTD N/a UNITED KINGDOM
Complete Solution Service Limited GLRS N/a UNITED KINGDOM
BDLT S.A. de C.V. TLTD N/a MEXICO
Telsa Telco Services SLTD N/a CHILE
And the second list will look like this
GIIN FINm CountryNm
AAAUG3.99999.SL.764 Asset Plus HSI Fund THAILAND
AABEIL.99999.SL.528 Gresham Capital CLO II B.V. NETHERLANDS
AAB36F.99999.SL.470 Maitland Malta Limited MALTA
AACRQK.99999.SL.756 BBGI GROUP SA SWITZERLAND
AADAD7.99999.SL.528 E-MAC DE 2009-I B.V. NETHERLANDS
AADDBX.99999.SL.060 GWD Limited BERMUDA
AAE9W5.99999.SL.764 Bualuang Money Market RMF THAILAND
AAGH8E.99999.SL.276 Sparda-Bank Baden-Wuerttemberg eG GERMANY
AAGR6U.99999.SL.438 Konsolidationsanstalt LIECHTENSTEIN
AAGWV3.99999.SL.360 BATAVIA PROTEKSI PRIMA 18 INDONESIA
AAGXH0.99999.SL.136 Monarch Capital Partners Ltd CAYMAN ISLANDS
AAHY1V.99999.SL.158 Pingtung County Farmers' Association TAIWAN
AAH0IZ.99999.SL.136 Diversified Absolute Return Fund CAYMAN ISLANDS
I suggest that you use following array formula:
= IFERROR(INDEX(List,SMALL(IF((INDEX(List,,2,1)=A2)*(INDEX(List,,3,1)=D2),ROW(List)-MIN(ROW(List))+1,""),1),1,1),"N/A")
To enter array formula in Windows use Ctrl+Alt+Enter.
On Mac keyboard use Command+Enter.
Then drag the formula downwards.
In this formula I have used named range List, which is equivalent to your Sheet2!$A$2:$C$99999. Named ranges make complicated formulas more readable and flexible.
If you do not want to use named ranges just replace List with Sheet2!$A$2:$C$99999.
=IFERROR(INDEX(Sheet2!$A$2:$C$99999,SMALL(IF((INDEX(Sheet2!$A$2:$C$99999,,2,1)=A2)*(INDEX(Sheet2!$A$2:$C$99999,,3,1)=D2),ROW(Sheet2!$A$2:$C$99999)-MIN(ROW(Sheet2!$A$2:$C$99999))+1,""),1),1,1),"N/A")
It works if your sheets look as follows:
I have a list of names with 1000 entries and maybe 750 unique. There are other attributes, like location and position. Can I create a pivot table that would show me simple stat's like X number of unique people, X number unique in location 1, location 2, location 3, and finally x number of positions in location 1, position 2/location1, position 3/location2...?
Name Location Title
Smith, Bob UK Sales Manager
Smith, Bob UK Plant Manger
Jones, Keith UK Sales Manager
Jones, Keith UK Plant Foreman
White, Derick Denver Sales Manager
Brown, Frank Boston Supply Chain
Black, Jay Denver Sales Manager
Smith, Jeff Denver Sales Manager
Gonzalez, Al UK
Gonzalez, Al UK Staging Area Manager
Bright, Susan Denver Legel Secretary
Bright, Susan Denver Paralegal
Bright, Susan Denver Executive Assistant
Bright, Susan Denver Press Secretary
Alf, Jeff Denver VP, Sales
Green, Burt Boston VP, Sales
Jones, Chuck Denver Plant Foreman
Alten, Cory Denver Sales Manager
Clark, Jerry Boston Plant Foreman
Romo, Tom Denver Sales Manager
You may want to consider using CountifS functions in adjacent columns to the data. For example to count unique people, just create a column (call it column x for this example) and enter =Countif(Column A, A1) and copy down for all the rows. then just enter =countif(Column X, 1) and that should give you the unique names.
You can use CountifS function for more complicated counting logic to answer the other questions.
I have done similar counting of unique entries using pivot tables.
I create a additional column that has a 1 if it is the first occurance of the "key" (ie name). The formula is similar to this: (assume Column A has the "key")
=IF(ROW(A1) = MATCH(A1,A:A,0),1,0)
This formula is then copied down for every row (or if it's a proper table, it's auto copied!)
The idea is that the MATCH returns the row number of the first occurrence of "key". If it is the same as the current row, then count 1. If the values aren't the same, it's a duplicate, so give it a 0 value.
When you then do a pivot table sum on this value, it adds up to the number of unique entries. (ie unique names in a region.)