+ Reply to Thread
Results 1 to 6 of 6

Excel Unique with REDUCE and Vstack

  1. #1
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    777

    Excel Unique with REDUCE and Vstack

    I have a question regarding the initiial vlaue of REDUCE when used with unique


    Please Login or Register  to view this content.

    this has an empty initial value and the unique does not work, but if REDUCE initial value replaced with "" the unique works ;

    Please Login or Register  to view this content.
    I've tried a few different syntax variations and the same seems to apply to all, why the difference? I've attached the examples;

    Richard
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,867

    Re: Excel Unique with REDUCE and Vstack

    You will see from the alignment of the 1 in G4 that it's text, not a number, so in that range, it and the number 1 are unique items.

    Try this:

    Please Login or Register  to view this content.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,867

    Re: Excel Unique with REDUCE and Vstack

    You could also use this to the same effect:

    Please Login or Register  to view this content.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,867

    Re: Excel Unique with REDUCE and Vstack

    When appropriate, I like to make use of the opening criterion in REDUCE to add a header row:

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    777

    Re: Excel Unique with REDUCE and Vstack

    Ok, lets see if I understand, so by using "", the first value becomes part of y variable and is operated upon by the double unary
    which it isn't if the initial value is empty?

    // added after the above ; Initial value empty but make x a number; UNIQUE( VSTACK( --x, count)) ))))

    Thanks for the other suggestions.

    Richard .
    Last edited by Dicken; 09-01-2024 at 02:50 PM.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,867

    Re: Excel Unique with REDUCE and Vstack

    Glad to have helped.

+ 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. Sum after Sort Unique VStack with Criteria for multiple worksheet
    By Etax in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-26-2024, 06:43 AM
  2. [SOLVED] Unique dont work with Vstack.
    By FT00 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-20-2024, 02:05 AM
  3. Unique Vstack Subtotal on two filtered tables
    By jlschae154 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-02-2023, 01:47 PM
  4. [SOLVED] feed single array via VSTACK and REDUCE issue
    By guillaume0314 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 09-16-2023, 08:25 AM
  5. [SOLVED] Excel VSTACK removing zeroes from table
    By ryanhol12 in forum Excel General
    Replies: 4
    Last Post: 03-26-2023, 09:52 AM
  6. Replies: 1
    Last Post: 12-17-2013, 03:18 PM
  7. Using VBA: I have a list with multiple entries.Need to reduce down to unique entries
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-25-2011, 03:19 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