+ Reply to Thread
Results 1 to 6 of 6

Search for word in one column and write number in another...

  1. #1
    Registered User
    Join Date
    08-28-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2007
    Posts
    2

    Search for word in one column and write number in another...

    This is my excel sheet:

    (Col A) | (Col B)
    OK-Q8 BANK AB | -1 984,00
    Övf via internet | -15 200,00
    MAXI ICA STORMAR* | -164,73

    | = columnseparator

    I want to search for the word ICA in col A and when it finds the word ICA it takes the number in col B and writes it in Col C.

    Thanks for any help!

    Also i want to search for other words but maybe take that later =P.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,737

    Re: Search for word in one column and write number in another...

    Try this:

    =VLOOKUP("*ICA*",A:B,2,0)

    though you might have to use semicolons instead of commas. You can put ICA in a cell somewhere (eg K1) and change the formula to this:

    =VLOOKUP("*"&K1&"*",A:B,2,0)

    Hope this helps.

    Pete

  3. #3
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Search for word in one column and write number in another...

    Assuming your data starts on row 1:

    C1:

    =if(isnumber(search("ICA",A1)),B1,"")

    And then copy downwards. It will fill in a value in C each time ICA appears and leave the rest blank.

  4. #4
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Search for word in one column and write number in another...

    How about:

    Please Login or Register  to view this content.
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  5. #5
    Registered User
    Join Date
    08-28-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Search for word in one column and write number in another...

    Thanks guys! Really nice, this worked perfect =if(isnumber(search("ICA",A1)),B1,""). Any trick how to search for multiple words?

  6. #6
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Search for word in one column and write number in another...

    With a little OR magic

    =if(or(isnumber(search("ICA",A1)),isnumber(search("daffodil",A1)),isnumber(search("hungryhungryhippos",A1)),B1,"")

    If(or(condition1, condition2, condition3),B1,"")

+ 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. [SOLVED] Search value in one column and write the corresponding value
    By AngelaP in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-24-2012, 06:45 AM
  2. How to search a column with keywords and write decimal value in to a row
    By naflas in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-06-2010, 04:39 AM
  3. VLOOKUP - search only one word from long text & write
    By canada123 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-22-2010, 09:57 PM
  4. seach specific word in column & write something different in next column
    By canada123 in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 02-05-2010, 05:09 PM
  5. How to search for a word in a column and have entire row opaque once word is found
    By copleyr in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 09-04-2009, 07:11 PM

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