Search & Lookup

marklongbottom

Board Regular
Joined
Dec 1, 2004
Messages
52
I have 2 tables. Table 1 is A1:A17 and table 2 is D1:F37 (both tables will get longer at somepoint).

What I'd like to do is create a formula in cell G2 that will look at the contents of cell D2 (Table 2), then look down Table 1 and if it finds any part of the text from cell D2 in any of the cells in Table 1, copy the Table 1 cell that matches in to G2. I then need the formula to keep going down column G doing this for all the data.

The contents of the cells in column D could have the phrase in any part of the cells in column A.

Can anyone help?
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
I have 2 tables. Table 1 is A1:A17 and table 2 is D1:F37 (both tables will get longer at somepoint).

What I'd like to do is create a formula in cell G2 that will look at the contents of cell D2 (Table 2), then look down Table 1 and if it finds any part of the text from cell D2 in any of the cells in Table 1, copy the Table 1 cell that matches in to G2. I then need the formula to keep going down column G doing this for all the data.

The contents of the cells in column D could have the phrase in any part of the cells in column A.

Can anyone help?
Can you post a few rows worth of data and tell/show us what results you expect?
 
Upvote 0
I have tried my best to label the columns but without borders it is a bit hard to read. The 3 columns at the end are my formula columns and the headers e.g. Matches Column A & D, etc show my expected results.


Table 1 (column A) Table 2 (column D) Table 2 (column E) Table 2 (column F) Matches Col A & D Matches Col A & E Matches Col A & F
Abu Dabbab Not divulged Not divulged Not divulged
Agi Dagi Unknown - EA03339, Black Angel SARL Black Angel
Aktogay RMG Auburn RMG Chilisai Chilisai
Alaigyr Bobrikovo Minerals Minerals Minerals Bobrikovo
Altintepe Minex Chaarat Not known Not known Chaarat
Altyntas Aalborg Portland Andash Shell lining Andash
Andash Al Alaigyr 31T - Phosphate Factory Alaigyr
Benkala Qaim Al Qaim Phosphate Factory
Biely Vrch Bobrikovo Minerals Minerals Minerals Bobrikovo
Bir El Afou EP Rossing Aktogay Ura Eronga Region Rossing Uranium Aktogay
Black Angel - - AO11-0021 Uitbreiding LTRB
Bobrikovo Unknown - EA03339, Black Angel SARL Black Angel
Bozschakol Bir El Afou EP Mine - - Bir El Afou EP
Chaarat Northland Resourses Kaunisvaara Kaunisvaara Iron Ore Study
Chilisai Kazakhmys Bozshakol Bozshakol Copper Project Bozschakol Bozschakol
 
Upvote 0

Cell Formulas
RangeFormula
A1Table 1 (column A)
A2Table 1 (column A)
A3Abu Dabbab
A4Agi Dagi
A5Aktogay
A6Alaigyr
A7Altintepe
A8Altyntas
A9Andash
A10Benkala
A11Biely Vrch
A12Bir El Afou EP
A13Black Angel
A14Bobrikovo
A15Bozschakol
A16Chaarat
A17Chilisai
D1Table 2 (column D)
D2Table 2 (column D)
D3Not divulged
D4Unknown
D5RMG
D6Bobrikovo Minerals
D7Minex Chaarat
D8Aalborg Portland
D9Al Alaigyr 31T
D10Qaim
D11Bobrikovo Minerals
D12Rossing Aktogay Uranium
D13-
D14Unknown
D15Bir El Afou EP Mine
D16Northland Resourses AB
D17Kazakhmys
E2Table 2 (column E)
E3Not divulged
E4-
E5Auburn
E6Minerals
E7Not known
E8Andash
E9-
E10Al Qaim
E11Minerals
E12Eronga Region - Desert
E13-
E14-
E15-
E16Kaunisvaara
E17Bozshakol
F2Table 2 (column F)
F3Not divulged
F4EA03339, Black Angel SARL
F5RMG Chilisai
F6Minerals
F7Not known
F8Shell lining for sand mill
F9Phosphate Factory
F10Phosphate Factory
F11Minerals
F12Rossing Uranium
F13AO11-0021 Uitbreiding LTRB
F14EA03339, Black Angel SARL
F15-
F16Kaunisvaara Iron Ore Study
F17Bozshakol Copper Project
G2Matches Column A & D
G6Bobrikovo
G7Chaarat
G9Alaigyr
G11Bobrikovo
G12Aktogay
G15Bir El Afou EP
H2Matches Column A & E
H8Andash
H17Bozschakol
I2Matches Column A & F
I4Black Angel
I5Chilisai
I14Black Angel
I17Bozschakol
 
Upvote 0
Excel 2010
ABCDEFGHI
1Table 1 (column A)Table 2 (column D)
2Table 1 (column A)Table 2 (column D)Table 2 (column E)Table 2 (column F)Matches Column A & DMatches Column A & EMatches Column A & F
3Abu DabbabNot divulgedNot divulgedNot divulged
4Agi DagiUnknown-EA03339, Black Angel SARLBlack Angel
5AktogayRMGAuburnRMG ChilisaiChilisai
6AlaigyrBobrikovo MineralsMineralsMineralsBobrikovo
7AltintepeMinex ChaaratNot knownNot knownChaarat
8AltyntasAalborg PortlandAndashShell lining for sand millAndash
9AndashAl Alaigyr 31T-Phosphate FactoryAlaigyr
10BenkalaQaimAl QaimPhosphate Factory
11Biely VrchBobrikovo MineralsMineralsMineralsBobrikovo
12Bir El Afou EPRossing Aktogay UraniumEronga Region - DesertRossing UraniumAktogay
13Black Angel--AO11-0021 Uitbreiding LTRB
14BobrikovoUnknown-EA03339, Black Angel SARLBlack Angel
15BozschakolBir El Afou EP Mine--Bir El Afou EP
16ChaaratNorthland Resourses ABKaunisvaaraKaunisvaara Iron Ore Study
17ChilisaiKazakhmysBozshakolBozshakol Copper ProjectBozschakolBozschakol

<COLGROUP><COL style="BACKGROUND-COLOR: #dae7f5"><COL><COL><COL><COL><COL><COL><COL><COL><COL></COLGROUP><THEAD>
</THEAD><TBODY>
</TBODY>
Sheet1

Worksheet Formulas
CellFormula
A1Table 1 (column A)
B1
C1
D1Table 2 (column D)
E1
F1
G1
H1
I1
A2Table 1 (column A)
B2
C2
D2Table 2 (column D)
E2Table 2 (column E)
F2Table 2 (column F)
G2Matches Column A & D
H2Matches Column A & E
I2Matches Column A & F
A3Abu Dabbab
B3
C3
D3Not divulged
E3Not divulged
F3Not divulged
G3
H3
I3
A4Agi Dagi
B4
C4
D4Unknown
E4-
F4EA03339, Black Angel SARL
G4
H4
I4Black Angel
A5Aktogay
B5
C5
D5RMG
E5Auburn
F5RMG Chilisai
G5
H5
I5Chilisai
A6Alaigyr
B6
C6
D6Bobrikovo Minerals
E6Minerals
F6Minerals
G6Bobrikovo
H6
I6
A7Altintepe
B7
C7
D7Minex Chaarat
E7Not known
F7Not known
G7Chaarat
H7
I7
A8Altyntas
B8
C8
D8Aalborg Portland
E8Andash
F8Shell lining for sand mill
G8
H8Andash
I8
A9Andash
B9
C9
D9Al Alaigyr 31T
E9-
F9Phosphate Factory
G9Alaigyr
H9
I9
A10Benkala
B10
C10
D10Qaim
E10Al Qaim
F10Phosphate Factory
G10
H10
I10
A11Biely Vrch
B11
C11
D11Bobrikovo Minerals
E11Minerals
F11Minerals
G11Bobrikovo
H11
I11
A12Bir El Afou EP
B12
C12
D12Rossing Aktogay Uranium
E12Eronga Region - Desert
F12Rossing Uranium
G12Aktogay
H12
I12
A13Black Angel
B13
C13
D13-
E13-
F13AO11-0021 Uitbreiding LTRB
G13
H13
I13
A14Bobrikovo
B14
C14
D14Unknown
E14-
F14EA03339, Black Angel SARL
G14
H14
I14Black Angel
A15Bozschakol
B15
C15
D15Bir El Afou EP Mine
E15-
F15-
G15Bir El Afou EP
H15
I15
A16Chaarat
B16
C16
D16Northland Resourses AB
E16Kaunisvaara
F16Kaunisvaara Iron Ore Study
G16
H16
I16
A17Chilisai
B17
C17
D17Kazakhmys
E17Bozshakol
F17Bozshakol Copper Project
G17
H17Bozschakol
I17Bozschakol

<THEAD>
</THEAD><TBODY>
</TBODY>

<TBODY>
</TBODY>
Sorry, I don't understand.
 
Upvote 0
Sorry you will have to excuse the bottom formula table. I don't know where that came from. It is the top table.
I'll try to explain again based on the table at the top.
The orange columns are the columns (G, H and I) I want my formulas in. G6 shows you what I want to show. This would be based on the formula looking at D6 then looking down the information in all the cells in column A to find any part of the contents of column D. In this case the formula would look for Bobrikovo and/or Minerals in column A but as only Bobrikovo is present it would only return Bobrikovo. Column H would need to do the same for column E and column A. And column I would need to do the same but for column F and column A.
Is this possible?
 
Upvote 0
Sorry you will have to excuse the bottom formula table. I don't know where that came from. It is the top table.
I'll try to explain again based on the table at the top.
The orange columns are the columns (G, H and I) I want my formulas in. G6 shows you what I want to show. This would be based on the formula looking at D6 then looking down the information in all the cells in column A to find any part of the contents of column D. In this case the formula would look for Bobrikovo and/or Minerals in column A but as only Bobrikovo is present it would only return Bobrikovo. Column H would need to do the same for column E and column A. And column I would need to do the same but for column F and column A.
Is this possible?
This is not possible using formulas.

You would need a VBA procedure to do this. Unfortunately, I'm not much of a programmer so someone else will need to help you with this.

Good luck!
 
Upvote 0

Forum statistics

Threads
1,214,817
Messages
6,121,720
Members
449,050
Latest member
MiguekHeka

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top