Results 1 to 4 of 4

Nested Functions collapsing data into #VALUE but I can't know why

Threaded View

  1. #1
    Registered User
    Join Date
    06-15-2023
    Location
    United States
    MS-Off Ver
    2305
    Posts
    1

    Nested Functions collapsing data into #VALUE but I can't know why

    (sample Workbook attached)

    I've written a function to take an input range, and output that same data with an added column containing the COUNTIF of the values in the first column.

    =LET(inputRange,B1:D16,LET(key, CHOOSECOLS(inputRange,1),HSTACK(inputRange, COUNTIF(key, CHOOSECOLS(key,1)))))

    The COUNTIF column ends up filled with #VALUE! errors, but the original input range prints out just fine. When I walk through the Evaluate Formula steps it looks like the inputRange is #N/A-ing out (but only in the evaluator - adding an IF(ISNA(inputrange) into my function doesn't trigger), but that appears to cause the COUNTIF data (which somehow still evaluates despite the #N/A's???) to collapse into a #VALUE! error. I don't know why it's happening or how to fix it.

    Breaking out only the HSTACK by itself and manually inputting the ranges the LET statements would generate correctly outputs what I want, but I don't know why it suddenly fails inside the LET statements.

    =HSTACK(B1:D16, COUNTIF(B1:D16,B1:B16))

    PLEASE NOTE: for background reasons I need to do this in a formula: using an automate script, macro, or VBA script are - unfortunately - not acceptable solutions in this situation.
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] How to apply nested IF functions in data validation
    By adriano.r.marques in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-29-2015, 06:01 PM
  2. Replies: 6
    Last Post: 03-17-2015, 01:35 AM
  3. [SOLVED] Collapsing or Un-Collapsing Grouped Rows using VBA
    By rz6657 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-24-2015, 12:39 PM
  4. Collapsing data in table
    By shhhhh22 in forum Excel General
    Replies: 4
    Last Post: 01-19-2012, 12:27 AM
  5. Collapsing a data set
    By cj21 in forum Excel General
    Replies: 2
    Last Post: 11-28-2011, 11:11 AM
  6. Excel 2007 : Grouping and collapsing data
    By bond002 in forum Excel General
    Replies: 2
    Last Post: 07-28-2010, 10:08 PM
  7. Collapsing Repeated Data
    By teddybouch in forum Excel General
    Replies: 7
    Last Post: 07-11-2008, 04:24 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