+ Reply to Thread
Results 1 to 7 of 7

IF column contains specific text then return value from adjacent cell

  1. #1
    Registered User
    Join Date
    01-21-2019
    Location
    norway
    MS-Off Ver
    2018
    Posts
    2

    IF column contains specific text then return value from adjacent cell

    Hi!

    I'm trying to return the value from a specific cell. So, if the ranges C2-C60000 contains "SUM:" then i need the value from the adjacent cell.
    Example:
    C50 contains the text "Sum:" then i need the value from D60 to be retrieved.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,893

    Re: IF column contains specific text then return value from adjacent cell

    C50 & D60????

    =IF(ISNUMBER(SEARCH("Sum:",C2)),D2,"")

    copied down. You may need ; instead of ,
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,737

    Re: IF column contains specific text then return value from adjacent cell

    try:
    =IFERROR(IF(SEARCH("Sum:",C50),D60,""),"")
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  4. #4
    Registered User
    Join Date
    01-21-2019
    Location
    norway
    MS-Off Ver
    2018
    Posts
    2

    Re: IF column contains specific text then return value from adjacent cell

    Hi! Thanks for a quick answer guys.
    The case here is that the cell containing "Sum:" can be any cell betwen C2-C6000

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,893

    Re: IF column contains specific text then return value from adjacent cell

    Now you have confused me... How does this NOT do what you want?



    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? However, please give us an indication of the approximate number of rows of data you want the solution to work with (100, 1000, 100,000 or whatever). Please don't attach a picture of an Excel sheet (no-one will want to re-type all your stuff before starting).

    1. It does NOT have to be your real sheet - mock up a SAMPLE if you need to. But not 1000's of rows!!! It makes manual checking so tedious. Whatever you do... make sure that all confidential information is removed first!!

    2. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    3. Make sure that your desired solution is also shown (mock up the results manually).

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Attached Files Attached Files

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,893

    Re: IF column contains specific text then return value from adjacent cell

    Or... is this what you want???
    Attached Files Attached Files

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,396

    Re: IF column contains specific text then return value from adjacent cell

    Hello Eivindsu. Welcome to the forum.

    I'm confused on how to interpret this as well.

    Perhaps an upload would clarify and expedite solution. It usually does.
    Dave

+ 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] Lookup specific text value and return value from adjacent cell
    By salmotrutta14 in forum Excel General
    Replies: 3
    Last Post: 10-17-2017, 03:16 PM
  2. If A Range Contains Specific Text, Return Adjacent Cell Value
    By Wallace113 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-10-2017, 11:51 AM
  3. Find specific value in Row, Return Text from Adjacent Cell
    By oneforfive in forum Excel General
    Replies: 5
    Last Post: 07-21-2015, 03:57 PM
  4. [SOLVED] Find text in column and return adjacent cell
    By frostii in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 06-27-2015, 07:44 PM
  5. [SOLVED] Find text in a column or range and return value of adjacent cell
    By chemoul in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-20-2012, 04:30 AM
  6. [SOLVED] Find Specific Text in Text String and Return Value in Adjacent Column
    By watchouse in forum Excel General
    Replies: 2
    Last Post: 07-11-2012, 03:53 PM
  7. Find and Match Text in Column Return Adjacent Cell
    By biancam in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-11-2012, 02:45 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