+ Reply to Thread
Results 1 to 9 of 9

Edit formula not to consider blank cells with formulas

  1. #1
    Registered User
    Join Date
    02-21-2021
    Location
    Manila
    MS-Off Ver
    O365 16:61
    Posts
    54

    Edit formula not to consider blank cells with formulas

    Hi there,

    How can I edit the following array formula not to consider blank cells that contain formulas?

    D3 =INDEX(A$3:A$20,AGGREGATE(15,6,ROW(A$3:A$20)/(INDEX($E$3:$J$6,N(IF(1,MATCH($B$3:$B$20,$D$3:$D$6,))),N(IF(1,COLUMN($E$3:$J$6)-COLUMN($D$3))))>0),ROWS(L$3:L3))-ROW(A$2))

    Currently, the formula works in a range where blank cells that are truly empty, such as E3:J6 in the attached mock file. However, I get the wrong results when I use it in the actual file where blank cells in a range have formulas. I tried replacing >0 with >"" but nothing happened.

    This should be fairly easy but I can't quite get it right.

    Appreciate the help!
    Cheers
    Attached Files Attached Files
    Last edited by aswethink; 03-25-2021 at 09:17 AM.

  2. #2
    Registered User
    Join Date
    02-21-2021
    Location
    Manila
    MS-Off Ver
    O365 16:61
    Posts
    54

    Re: Edit formula not to consider blank cells with formulas

    To be specific, what is happening is that in the mockup file, MO-2 is displayed only 4 times, representing the 4 non-empty cells in E4:J4. However, in the actual file, MO-2 is displayed 6 times, and I think this is happening because the blank cells in the actual file, represented by E4:J4 in the mockup, have formulas in them.

  3. #3
    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,063

    Re: Edit formula not to consider blank cells with formulas

    Please post a sample file that SHOWS the problem instead of one that doesn't. BtW, it is NOT an array formula (a thing of the past with O365).
    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

  4. #4
    Registered User
    Join Date
    02-21-2021
    Location
    Manila
    MS-Off Ver
    O365 16:61
    Posts
    54

    Re: Edit formula not to consider blank cells with formulas

    Thanks for the reminder, Glenn. I'll reconstruct the problem in the mockup and send it thereafter.

  5. #5
    Registered User
    Join Date
    02-21-2021
    Location
    Manila
    MS-Off Ver
    O365 16:61
    Posts
    54

    Re: Edit formula not to consider blank cells with formulas

    Sheet1 displays the formula working in D3.
    Sheet2 displays the problem. The formula works but is also including blank cells in its assessment of U3:Z7.

    U3:Z7 in Sheet1 do not have formulas.
    U3:Z7 in Sheet2 contain formulas.

    I would like to edit the formula in D3 of Sheet2 to display the same results as those found in column L:L of Sheet1.
    Attached Files Attached Files
    Last edited by aswethink; 03-25-2021 at 09:18 AM.

  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,063

    Re: Edit formula not to consider blank cells with formulas

    D2, copied across and down:

    =IFERROR(INDEX(A$3:A$20,AGGREGATE(15,6,ROW(A$3:A$20)/(INDEX($U$3:$Z$7,N(IF(1,MATCH($B$3:$B$20,$T$3:$T$7,))),N(IF(1,COLUMN($U$3:$Z$7)-COLUMN($T$3))))<>""),ROWS(D$3:D3))-ROW(A$2)),"")

    F2, copied down:

    =INDEX($U$3:$Z$7,MATCH(E3,$T$3:$T$7,0),AGGREGATE(15,6,(COLUMN($T:$Z)-COLUMN($T:$T)+1)/(INDEX($U$3:$Z$7,MATCH($D3&$E3,$D3&$T$3:$T$7,0),)<>""),COUNTIFS($D$3:$D3,$D3,$E$3:$E3,$E3)))
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    02-21-2021
    Location
    Manila
    MS-Off Ver
    O365 16:61
    Posts
    54

    Re: Edit formula not to consider blank cells with formulas

    Oh so that's why it would not work. I did attempt to replace >0 with <>"" in D3, but thought F3 would just follow and did not need to be changed.

    I also realised I have been referencing the wrong cells since the beginning of my post. I'll go edit it them.

    Thank you very much, Glenn!

  8. #8
    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,063

    Re: Edit formula not to consider blank cells with formulas

    You're welcome & thanks for the feedback.

  9. #9
    Registered User
    Join Date
    02-21-2021
    Location
    Manila
    MS-Off Ver
    O365 16:61
    Posts
    54

    Re: Edit formula not to consider blank cells with formulas

    You're welcome!

+ 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] Formula to show 'Reject' number and type
    By chuttus in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-09-2018, 08:18 PM
  2. [SOLVED] formula to define accept/reject for testings of some product with diffrent spec.
    By Pt.purba in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-18-2017, 01:14 PM
  3. Replies: 5
    Last Post: 05-07-2015, 06:12 AM
  4. [SOLVED] Formula to calculate Complete's and Reject's
    By rajeshntiwari in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-23-2014, 06:57 PM
  5. [SOLVED] Formula that will count names but reject the word BLOCKED
    By armynurse in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-21-2012, 06:20 PM
  6. [SOLVED] Reject Manual Input
    By SMERTZ in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-06-2006, 10:30 AM
  7. Disable Accept/Reject Changes
    By tjtjjtjt in forum Excel General
    Replies: 0
    Last Post: 04-20-2005, 03:06 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