Help with if statement

Davebro

Board Regular
Joined
Feb 22, 2018
Messages
135
Office Version
  1. 365
  2. 2021
  3. 2016
Platform
  1. Windows
I have a list of teams I want to find if the selection (Column B), is a Home selection or away selection from (Column A). The teams are seperated by a v.
So I want the teams left of the v to be a H and teams right of the v to be an A.

Book1
ABC
1Everton v ChelseaEvertonH
2FC Twente v Fortuna SittardFortuna SittardA
3Hearts v Dundee UtdDundee UtdA
4Universitatea Craiova v CS MioveniCS Mioveni
5Valencia v GironaGirona
6Guimaraes v Estoril PraiaEstoril Praia
7Athletic Bilbao v MallorcaMallorca
8Porto v Sporting LisbonSporting Lisbon
9Celta Vigo v Real MadridCelta Vigo
10Notts Co v ChesterfieldNotts Co
11Cagliari v SSD BariSSD Bari
Sheet1
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
This should do it for you, putting the formula in cell C1 and filling down

=IF(SEARCH(B1,A1,1)=1,"H","A")
 
Upvote 1
Solution

Forum statistics

Threads
1,224,526
Messages
6,179,322
Members
452,906
Latest member
Belthazar

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