+ Reply to Thread
Results 1 to 6 of 6

Return Value from column based on header value

  1. #1
    Forum Contributor
    Join Date
    08-17-2009
    Location
    West Midlands
    MS-Off Ver
    Excel 2016
    Posts
    213

    Return Value from column based on header value

    Morning all,

    Right then. I'm having trouble working this one out:

    Cells A3:A500 contain product numbers, e.g. 1001, 1002, 1003 etc.. etc...
    Cells G2:N2 are column headers, e.g. North2011, South2011, North2012, South2012 etc... etc...
    Cell F2 is a lookup that will return a year, e.g. 2011, 2012, 2013 etc... etc...

    Against each product is a "yes" if it was sold in the north or south region for each year. This could be both north and south, one or the other or none at all.

    What I would like is a formula in cells E3:E500 that looks at the year in cell F2 and if there is a "yes" in either the North or South for that year to return "yes" otherwise blank.

    Apologies for the long description but I am unable to upload a sample document due to firewalls.

    Thanks for any help in advance!

    SA

  2. #2
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Return Value from column based on header value

    In E3 use this Array Formula.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Please confirm the formula by pressing Ctrl + Shift + Enter, Not Just Enter..

    Please let us know, if nay other help required..
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

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

    Re: Return Value from column based on header value

    Try..

    =IF(SUMPRODUCT(ISNUMBER(FIND($F$2,$G$2:$N$2))*($G3:$N3="Yes")),"Yes","No")
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Forum Contributor
    Join Date
    08-17-2009
    Location
    West Midlands
    MS-Off Ver
    Excel 2016
    Posts
    213

    Re: Return Value from column based on header value

    Guys, thanks for the responses - which both work perfectly, by-the-way. I think I'm going to opt for Ace_XL's solution just on the basis that it's not an array formula which I'm worried could slow down an already large spreadsheet.

    Kudos, chaps. I'm more than happy to add to your 'reputation' points.

    SA

  5. #5
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Return Value from column based on header value

    SA,

    I like your choice skill..
    Not only becaouse of ARRAY, but ACE's formula can check.. more that two column consist YEAR..

    Good choice..

  6. #6
    Forum Contributor
    Join Date
    08-17-2009
    Location
    West Midlands
    MS-Off Ver
    Excel 2016
    Posts
    213

    Re: Return Value from column based on header value

    Thanks again for your time, and expertise - really is very much appreciated.

+ 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. Replies: 6
    Last Post: 07-23-2014, 06:41 PM
  2. Replies: 4
    Last Post: 03-13-2013, 12:38 PM
  3. Replies: 6
    Last Post: 07-26-2012, 06:34 PM
  4. [SOLVED] Trying to return a column header in a cell based on a value
    By brianfromla in forum Excel General
    Replies: 2
    Last Post: 06-26-2012, 10:37 AM
  5. [SOLVED] Return header based matrix
    By marreco in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-11-2012, 01:54 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