Results 1 to 11 of 11

IF cells in a range are empty, reference values in another cell range

Threaded View

  1. #11
    Registered User
    Join Date
    01-13-2021
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel O365 Enterprise
    Posts
    10

    Re: IF cells in a range are empty, reference values in another cell range

    Quote Originally Posted by bebo021999 View Post
    Try:

    =SUMPRODUCT((C11:C16=$C$6)*((D11:D16=$D$5)+(D11:D16="")*(B11:B16=$D$5)))
    Amazing, this appears to do the job! Would it possible to explain how this is constructed - I understand what each sub component is searching for but can't fully grasp how the calculation works, particularly with the multiplication (I assume this represents a wildcard of some description)? My interpretation so far is as follows:

    Searches for:
    1. Variable 1 "X" criteria;
    2. Test 2 "A" criteria with a condition (*) to identify and action an empty cell;
    3. if Test 2 is identified as empty, the alternate search is in Test 1 for "A" criteria

    I have integrated this back in to the SUMPRODUCT/OFFSET formula to calculate visible rows only enabling more slicing/filtering of the broader dataset against other variables:
    =SUMPRODUCT(SUBTOTAL(3,OFFSET($C$11:$C$16,ROW($C$11:$C$16)-MIN(ROW($C$11:$C$16)),,1)),(C11:C16=$C$6)*((D11:D16=$D$5)+(D11:D16="")*(B11:B16=$D$5))+0)

    Thanks in advance
    Last edited by KJ_; 01-14-2021 at 09:51 PM. Reason: Updated

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] count values in one range if the cells in a corresponding range are not empty
    By Thurgel in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 06-09-2020, 10:22 AM
  2. [SOLVED] How to create a dynamic range if the last cell is empty and the columns have empty cells
    By peter_swe in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-03-2016, 11:18 PM
  3. Replies: 0
    Last Post: 08-03-2016, 07:01 PM
  4. Replies: 5
    Last Post: 08-21-2014, 09:10 AM
  5. [SOLVED] Transfer cells range to another sheet if first cell of destination range is empty
    By kopapa in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 11-04-2013, 04:32 PM
  6. If the range A1:F1 and the cell H1 are not empty, then all range cells must be not em
    By loroverde in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-29-2013, 04:13 AM
  7. MACRO to empty a range of cells based on whether specified cell is empty
    By TBJV in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-01-2013, 10:35 PM

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