+ Reply to Thread
Results 1 to 10 of 10

Conditional Text Formula

Hybrid View

  1. #1
    Registered User
    Join Date
    08-22-2012
    Location
    Downingtown, PA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Conditional Text Formula

    Using Excel 2010 and it's new to me...

    I am building a summary sheet, and I need to copy text from Sheet2 to my summary.

    I need a formula to look at Sheet2 for the name of a company in column A then it returns a start date listed for that company in on sheet2 in Column B.

    Side note, at some point Sheet2 may get sorted (column order will not change), so I need the formula to match the company name and pull the appropriate date cell for that company no matter where it is in the sheet.

    I know I've done this before, but I cannot remember it! Any help much appreciated!!

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Conditional Text Formula

    use VLOOKUP

    e.g.

    =VLOOKUP(A2,Sheet2!A:B,2,FALSE)
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Conditional Text Formula

    =Vlookup(A1,Sheet2!A:B,2,False)
    as long as you do not have comapny names
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Registered User
    Join Date
    08-22-2012
    Location
    Downingtown, PA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Conditional Text Formula

    Yay! It worked, thank you!!

    ---------- Post added at 11:29 AM ---------- Previous post was at 11:24 AM ----------

    Quick question, what does the "A,B" represent in the formula? I need to adjust it for other columns.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Conditional Text Formula

    It means the lookup table is from columns A to B, inclusive, with column A being the left most column in the table selected, and is the column to do the lookup against... the 2 means the column number within the table to extract matching results from.

  6. #6
    Registered User
    Join Date
    08-22-2012
    Location
    Downingtown, PA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Conditional Text Formula

    That's what I thought, but what if I need to it to look in column G for the data. Do I put A,G?

    ---------- Post added at 11:39 AM ---------- Previous post was at 11:32 AM ----------

    Ahhh, OK! that works! thanks so much friends!

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Conditional Text Formula

    I guess you figured out that it would be:

    =VLOOKUP(A2,Sheet2!A:G,7,FALSE)

  8. #8
    Registered User
    Join Date
    08-22-2012
    Location
    Downingtown, PA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Conditional Text Formula

    Yup, thanks! Now, could I just tell it to look at the whole spreadsheet "A,AI" and to return the column number I want, so say "A,AI,14"?

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Conditional Text Formula

    yes you can.... have a deeper look at VLOOKUP function in Excel help for more info/examples.

  10. #10
    Registered User
    Join Date
    08-22-2012
    Location
    Downingtown, PA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Conditional Text Formula

    Thanks again!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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