How do I get Excel to match content of cell and perform an action?

nyancat

New Member
Joined
Jul 25, 2013
Messages
3
[FONT=NettoOT, Arial, sans-serif]I will have multiple Excel files that have very similar data in the first column (Company Names), how do I get Excel to find out what the information is in the first column and then post it's website in the 2nd column from a pre-populated list? I have hundreds of Company Names per Excel sheet.

For example I want to search in column one for the company "Apple", if "Apple is found, "http://www.apple.com" will display in the 2nd column. Then if "Microsoft" is found, "http://www.microsoft.com" will display in the 2nd column.


[/FONT]
 

Some videos you may like

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

ArthriticPanda

Active Member
Joined
Feb 24, 2013
Messages
292
Hi nyancat,

You could create your master list of company names and web addresses on sheet2 and then use the INDEX MATCH function in an IF statement to put the relevant site against the company name which is typed in a certain cell.

Put the following formula in column B and copy down:

=IF(A1=$F$1,INDEX(Sheet2!$B$1:$B$2,MATCH(Sheet1!$F$1,Sheet2!$A$1:$A$2,0)),"")

<b>Excel 2010</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #BBB"><colgroup><col width="25px" style="background-color: #DAE7F5" /><col /><col /><col /><col /><col /><col /></colgroup><thead><tr style=" background-color: #DAE7F5;text-align: center;color: #161120"><th></th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th><th>F</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">1</td><td style=";">Company A</td><td style=";"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style=";">Search:</td><td style=";">Apple</td></tr><tr ><td style="color: #161120;text-align: center;">2</td><td style=";">Company B</td><td style=";"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">3</td><td style=";">Company C</td><td style=";"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">4</td><td style=";">Microsoft</td><td style=";"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">5</td><td style=";">Company D</td><td style=";"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">6</td><td style=";">Apple</td><td style=";">http://www.apple.com</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">7</td><td style=";">Company E</td><td style=";"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr></tbody></table><p style="width:3.6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #BBB;border-top:none;text-align: center;background-color: #DAE7F5;color: #161120">Sheet1</p><br /><br />

<b>Excel 2010</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #BBB"><colgroup><col width="25px" style="background-color: #DAE7F5" /><col /><col /></colgroup><thead><tr style=" background-color: #DAE7F5;text-align: center;color: #161120"><th></th><th>A</th><th>B</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">1</td><td style=";">Microsoft</td><td style="text-decoration: underline;color: #0000FF;;">http://www.microsoft.com</td></tr><tr ><td style="color: #161120;text-align: center;">2</td><td style=";">Apple</td><td style="text-decoration: underline;color: #0000FF;;">http://www.apple.com</td></tr></tbody></table><p style="width:3.6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #BBB;border-top:none;text-align: center;background-color: #DAE7F5;color: #161120">Sheet2</p><br /><br />


Hopefully this will be of some use.

AP
 
Last edited:

nyancat

New Member
Joined
Jul 25, 2013
Messages
3
Hi AP,

Is there anywhere I can download a sample of your excel sheet? I tried to replicate your instructions, but it's not working for me.

Thank you so much.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,519
Messages
5,602,141
Members
414,505
Latest member
quoctrungvu99

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
Top