+ Reply to Thread
Results 1 to 10 of 10

Excel 2007 : Extracting data from two columns and only using info from one.

  1. #1
    Registered User
    Join Date
    09-29-2011
    Location
    Lima Ohio
    MS-Off Ver
    Excel 2007
    Posts
    7

    Extracting data from two columns and only using info from one.

    I have four columns all text.
    Column 1 has data that is random and the row it's in changes daily.
    Column 3 has the same data as column 1 but in a static order.
    Column 4 has static data that says the data in each row in column 3 is either Labor or Nonlabor.

    I would like to be able to write a formula in Column 2 Row 1 that would match up the data in Column 1 Row 1 with the same data in Column 3 Row ?? but only return the value in column 4 (either Labor or Nonlabor) of that match.

    I will then just fill down for each row with the formula.

    Thanks for any help.
    Last edited by hilltopper; 10-13-2011 at 11:07 AM. Reason: Poor Title

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Which formula to use?

    You need an index and match (and, incidentally, a more descriptive title for this thread ... read the forum rules)

    =INDEX(D:D,MATCH(A1,C:C,0),1)

  3. #3
    Registered User
    Join Date
    09-29-2011
    Location
    Lima Ohio
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Extracting data from two columns and only using info from one.

    Wow, what a rapid response. Thank you so much I will give it a try. As for the post title, I've changed it already. Not thinking, Sorry about that.

  4. #4
    Registered User
    Join Date
    09-29-2011
    Location
    Lima Ohio
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Which formula to use?

    I have changed the Title. Won't happen again.

  5. #5
    Registered User
    Join Date
    09-29-2011
    Location
    Lima Ohio
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Which formula to use?

    I used the formula given. However, I receive a value in column 2 of #N/A. The particular value in column 1 row 1 is 18T. In columns 3 and 4 the value of 18T and Nonlabor are on row 2. I need the value on row 2 column 4 as a result. Thanks.

  6. #6
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Extracting data from two columns and only using info from one.

    Could you post an example worksheet?

  7. #7
    Registered User
    Join Date
    09-29-2011
    Location
    Lima Ohio
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Extracting data from two columns and only using info from one.

    Attached is the worksheet I'm using.
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    08-04-2010
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    110

    Re: Extracting data from two columns and only using info from one.

    Doesn't help that the data in Column 3 has erroneous spaces in it.
    Do a Ctrl+H, and replace the spaces with nothing then do a regular Vlookup against it and you'll have your result.

  9. #9
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Extracting data from two columns and only using info from one.

    The issue is that the data in column C has been centred by putting leading spaces in front of it(!).

    If you change my formula to =INDEX(D:D,MATCH("*" & A1,C:C,0),1) it will work fine.

  10. #10
    Registered User
    Join Date
    09-29-2011
    Location
    Lima Ohio
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Extracting data from two columns and only using info from one.

    Thanks to Nikeyg and Andrew.R for the excellent help. That solved the problem and I'll mark it as such. Excellent help. Hopefully I'll become better at this in time.

+ 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