Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In my Excel spreadsheet:-

  • In Cells A1 and down I have cities listed. For instance Cell A1 has: "Daytona Beach, FL"
  • In Cells B1 and down I have some generic information with the word CITY in it. For instance: Cell B1 has "Compare mortgage & refinance rates from different mortgage lenders and brokers in CITY. Find the home refinance rate you were looking for in CITY."

Is there a formula to replace the word CITY that is in the contents of Cell B1 with the contents of Cell A1?

share|improve this question

migrated from stackoverflow.com Sep 13 '12 at 20:25

This question came from our site for professional and enthusiast programmers.

In a third cell

=SUBSTITUTE(B1,"CITY",A1)
share|improve this answer
    
Perfect! Thank you. :D – user1667462 Sep 13 '12 at 4:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.