+ Reply to Thread
Results 1 to 6 of 6

Return value based on 2 other cells

  1. #1
    Forum Contributor
    Join Date
    04-21-2009
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    710

    Return value based on 2 other cells

    Hi all, please find attachment enclosed

    In cells B16, B18, B20 and B22 I want the dates to display by formula.

    I want to find the first blank cell (non f) which is coloured green for each product (lines 4,6,8,10) where there is a date populated in row 1.

    As you can see in line 4, the first blank (green) cell is H4 - but there is no date in row 1. The first blank (green) cell with a date in row 1 is AV4 - so in cell B16 it displayed 23/02/2018.
    Same for other 3 rows.

    Can someone help with a formula to do this automatically?
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Return value based on 2 other cells

    In B16, a regular formula, copied down:

    =IF(A16="","",INDEX($C$1:$BN$1,MATCH(1,INDEX(($C$1:$BN$1>0)*(C4:BN4<>"f"),0),0)))

    though your d@mned merged cells do make it awkward. Kill them, before they kill you. Widen column B instead.
    Attached Files Attached Files
    Last edited by Glenn Kennedy; 01-11-2018 at 07:01 AM.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Return value based on 2 other cells

    You may have to unmerge those cells.

    in B16
    =MIN(IF((C4:BN4<>"f")*(LEN(C$1:BN$1)<>0),C$1:BN$1))
    Array formula, use Ctrl-Shift-Enter

    and copy to the other lines below.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Return value based on 2 other cells

    =INDEX($1:$1,SMALL(IF(($C$1:$ZZ$1>0)*($C4:$ZZ4=""),COLUMN($C$1:$ZZ$1)),COLUMNS($A:A))) as array formula
    unmerge cells
    input formulas
    merge cells

  5. #5
    Forum Contributor
    Join Date
    04-21-2009
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    710

    Re: Return value based on 2 other cells

    Thanks all for your replies. The non array formula is preferred in this instance but all good suggestions

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Return value based on 2 other cells

    You're welcome.... and beware of those merged cells. Life's better without them.

+ 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. Trying to return a cells value in another cell based on a condition
    By ashish.verma in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-14-2016, 09:24 PM
  2. [SOLVED] Trying to return value based on two cells in one row matching two different cells
    By bellicusa in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-11-2015, 11:14 AM
  3. Return a value from a table based on several other cells
    By Ranulor in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-26-2014, 01:05 PM
  4. Need to return value based on multiple cells
    By Coco Dreamboat in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-05-2014, 02:12 AM
  5. Return non-blank cells based on drop-down
    By j_harrison in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-17-2013, 04:13 PM
  6. Replies: 2
    Last Post: 08-19-2011, 02:28 PM
  7. If function to return no. based on 2 cells?
    By duffer in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 10-15-2008, 09:10 AM

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