+ Reply to Thread
Results 1 to 7 of 7

If B3="TEXT" then replace C3 with "TEXT"

  1. #1
    Registered User
    Join Date
    10-07-2019
    Location
    Sweden
    MS-Off Ver
    Office Busines 2019
    Posts
    8

    If B3="TEXT" then replace C3 with "TEXT"

    I am working on a CSV document and as far as I understand I cant use formulas in the cells.
    I have a sheet where I would need to use the replace function in a certain way but im unsure of how. Lets see if I can explain it in an understandable way.
    If there is a text "EGKK" in column B then replace column C at the same row as where "EGKK" was found with "London Gatwick".
    I have a hard time beleiving there is a function capable of this but I have to ask as doing it manually would take a long time.

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: If B3="TEXT" then replace C3 with "TEXT"

    Hello and welcome to the forum.

    If it's in Excel, you can use formulas.

    In a blank column, let's say in row 2 of column D, Enter this:
    =IF(B2="EGKK","London Gatwick",C2)
    Copy the formula down the entire column.

    Now copy column D and paste as values into column C.

    You can now delete column D.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: If B3="TEXT" then replace C3 with "TEXT"

    Hi,

    You will of course need a table of ICAO airport codes with the code in the first column and the decription in the second column.
    Name the two column range of cells as say "ICAO"

    Then in C1 copied down use

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,913

    Re: If B3="TEXT" then replace C3 with "TEXT"

    do the following
    1) Use Data Filters at Column Headers
    2) Filter Data in Column B (Select "EGKK" for Filters)
    3) Then Change the Text in Column C for 1 time in the same row
    4) Then copy the text (Ctrl+C) which you entered in Column C
    5)Then Select Column C (From Top to Bottom the after filter data in Column B)
    6) Then Press Ctrl+G (Go to) > click on Special Button > Select Visible Cells only > OK
    7) Then Paste (Ctrl+V) the copied data
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  5. #5
    Registered User
    Join Date
    10-07-2019
    Location
    Sweden
    MS-Off Ver
    Office Busines 2019
    Posts
    8

    Re: If B3="TEXT" then replace C3 with "TEXT"

    Thanks, I think this might work.

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: If B3="TEXT" then replace C3 with "TEXT"

    Do we presume that you only want to change the EGKK Gatwick codes or does your csv file contain many airport codes that need changing?

  7. #7
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: If B3="TEXT" then replace C3 with "TEXT"

    I think Richard's solution is the best way.
    By the way, you need no to save back to .csv file format.
    I mean you can save in excel format for the purpose (text replace)
    like 1 sheet for copy .csv in and the other sheet for output of .csv
    (By any formula in them)
    By this way, you can convert it again and again later.

    Regards.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 05-02-2018, 08:03 AM
  2. Replies: 4
    Last Post: 06-11-2017, 02:03 PM
  3. Replies: 1
    Last Post: 08-15-2014, 06:00 AM
  4. Date format of just "st" "nd" "rd" and "th" with text included
    By notrandom in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-10-2013, 05:45 PM
  5. [SOLVED] If there is any text in column "A$" on "sheet1" then move cell to column "A$" on "sheet2"
    By ckgeary in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-27-2013, 08:28 PM
  6. How can i copy value from "HTMLText"(EMBED("Forms.HTML:Text","")),using Macro
    By andrewyang in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2010, 12:47 AM
  7. Replace numbers with Text ("1" to "Apple", for example)
    By pilotwings64 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-07-2008, 06:56 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1