+ Reply to Thread
Results 1 to 3 of 3

Return text based on matching two columns criteria

  1. #1
    Forum Contributor
    Join Date
    02-14-2012
    Location
    Warrington
    MS-Off Ver
    Excel 365
    Posts
    377

    Return text based on matching two columns criteria

    Anyone able to think of a formula that based on Period and name to return the area.

    So for example if I had Tom and period 2 as the criteria, it should return area = West

    I'd normally use a sumproduct on this sort of thing but because its text I want to return and I need some greater than and less than in there its a new one on me.

    Name Area From Period To Period
    Tom West 1 5
    Tom South 6 7
    Tom West 8 12
    John North East 1 2
    John North West 3 7
    John South West 8 12
    Attached Files Attached Files

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Return text based on matching two columns criteria

    Try
    =lookup(2,1/(($b$3:$b$8=$i3)*($d$3:$d$8<=$h3)*($e$3:$e$8>=$h$3)),$c$3:$c$8)
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Forum Contributor
    Join Date
    02-14-2012
    Location
    Warrington
    MS-Off Ver
    Excel 365
    Posts
    377

    Re: Return text based on matching two columns criteria

    Quote Originally Posted by samba_ravi View Post
    Try
    =lookup(2,1/(($b$3:$b$8=$i3)*($d$3:$d$8<=$h3)*($e$3:$e$8>=$h$3)),$c$3:$c$8)
    Thankyou! Whats the logic here?

+ 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] Return row based on two matching criteria.
    By IMM Tech in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-05-2018, 02:23 PM
  2. [SOLVED] Return a 'yes' or 'no' based on a two columns matching + a third col having two matches
    By aitchezero in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 07-18-2017, 01:13 AM
  3. Replies: 8
    Last Post: 05-08-2017, 09:17 PM
  4. return data based on matching 2 criteria
    By jsboss in forum Excel General
    Replies: 4
    Last Post: 06-29-2016, 11:29 PM
  5. Return latest date based on matching criteria
    By senthilvenkatesh in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-25-2014, 02:49 AM
  6. matching values based on criteria and return values from another columns
    By lizard54 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2012, 11:29 AM
  7. [SOLVED] Return value based on matching across multiple columns
    By cde1983 in forum Excel General
    Replies: 3
    Last Post: 12-20-2011, 09:34 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