+ Reply to Thread
Results 1 to 5 of 5

If a cell contains chosen text, add value from another cell to chosen cell

  1. #1
    Registered User
    Join Date
    11-30-2012
    Location
    Markham, Ontario
    MS-Off Ver
    Excel 2007
    Posts
    3

    If a cell contains chosen text, add value from another cell to chosen cell

    Hello. I'm a new member and hope I follow the rules...

    Using Excel 2007, in a selected cell (on another worksheet), I would like to enter a function (?)...If the chosen cell on the other worksheet contains certain text, add the text that appears in another cell on the same row. (Eg. In cell A2 on worksheet 2: If there is the text "Da" in cell A5 on worksheet 1, then return the text that appears in cell A2 on worksheet 1.) Is this doable?

    thank you

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

    Re: If a cell contains chosen text, add value from another cell to chosen cell

    Put this formula in A2 of Sheet2:

    =IF(ISNUMBER(SEARCH("Da",Sheet1!A5)),Sheet1!A2,"")

    Not sure that you meant to return the text from Sheet1!A2 - did you mean A5 ? (If so just change the reference).

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    11-30-2012
    Location
    Markham, Ontario
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: If a cell contains chosen text, add value from another cell to chosen cell

    Pete: Thank you for your quick response and it's bang on!

    To expand on this question, can I expand a reference to look for certain text in a range of cells and return the text in a cell from the corresponding row? So the formula in A2 of Sheet 2 would possibly look like:
    =IF(ISNUMBER(SEARCH("Da",sheet1!F5:F12)),sheet1!B5:B12,"")

    Thank you.

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

    Re: If a cell contains chosen text, add value from another cell to chosen cell

    I think it's time to post a sample workbook, where you can explain more clearly what you want to achieve. The FAQ above gives details of how to attach a file to one of your posts.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    11-30-2012
    Location
    Markham, Ontario
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: If a cell contains chosen text, add value from another cell to chosen cell

    Here's the sample file. I'm trying to create a daily staffing sheet (sheet 2)from the master schedule (sheet 1). Working in cell C8 on sheet 2: On sheet one if "Da" is found in cells F5 to F31 return whatever appears in the corresponding B column. Truly appreciate the help.
    Attached Files Attached Files
    Last edited by lmn; 12-06-2012 at 04:37 PM. Reason: typo correction

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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