Results 1 to 3 of 3

Thread: Making a What If Statement for Adding Text to a cell

  1. #1

    Making a What If Statement for Adding Text to a cell



    Register for a FREE account, and/
    or Log in to avoid these ads!

    I have a worksheet I have that I need to extract the country from cell B2 abd insert in Cell B1. I want the original data to remain, so I am not talking about replacement.

    Here is an example.
    A=Country
    B=Address

    I need to input a formula in cell A2, to search in cell B2 for the country in the address line and input the value(name of country) in column A.

    I need the formula to look through a list of say 60 names for the name in column B.


    Country Full Address
    5th Avenue, New Zealand
    Raby Castle, Durham, England
    Veiros, Aveiro, Portugal
    Barcellanos, Braga, Poland
    Durham, Bonsai, Brazil
    Castleburry, Herdfordshire, Italy
    Kinnersly, Balmand, Canada
    La Mote Kent, Peru
    Champagne, Cards, Australia

    Attached Files Attached Files

  2. #2
    Super Moderator NBVC's Avatar
    Join Date
    May 2011
    Location
    Mississauga, Canada
    Posts
    1,518
    Articles
    0
    Excel Version
    Excel 2016
    Try:

    =LOOKUP(10^10,SEARCH(Countries!$A$2:$A$53,B2),Countries!$A$2:$A$53)

    copied down


  3. #3
    Quote Originally Posted by NBVC View Post
    Try:

    =LOOKUP(10^10,SEARCH(Countries!$A$2:$A$53,B2),Countries!$A$2:$A$53)

    copied down

    That worked great, thank you, this will save me hours or days of time,

    have a great day,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •