+ Reply to Thread
Results 1 to 3 of 3

How to code detection of varying equalities in an array

  1. #1
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Manchester England
    MS-Off Ver
    Excel 2010
    Posts
    992

    How to code detection of varying equalities in an array

    I have an array and I need to be able to detect when a varying number of consecutive array elements are equal. I want to be able to call the code and give the number of elements I need to find.

    The following does not work but I hope will illustrate what I am looking for.
    Please Login or Register  to view this content.
    I have been looking at ways of recording the number of equalities in the p loop, but I am sure there is a more elegant way.
    John

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,619

    Re: How to code detection of varying equalities in an array

    Not really clear to me, but let's try (for one dimensional array):

    Please Login or Register  to view this content.
    of course in 2-dimentional - similar but with 2 loops
    Best Regards,

    Kaper

  3. #3
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Manchester England
    MS-Off Ver
    Excel 2010
    Posts
    992

    Re: How to code detection of varying equalities in an array

    Thanks for your help. I have now solved the problem using your ideas. Wonderful!
    John

+ 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 based on two conditions in an array with varying lengths
    By jd354 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-06-2012, 06:38 PM
  2. Finding the Average of the Top 10% of a varying sized array
    By excelbunny in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-26-2012, 12:22 AM
  3. Can In-Equalities such as [ <=,>=,<>,= ] be dynamically used in a code?
    By e4excel in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-17-2011, 04:03 PM
  4. Why won't SUMPRODUCT recognize some equalities?
    By Ingeniero1 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-29-2008, 02:22 AM
  5. Detection of Macro Code
    By Chris Gorham in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-26-2005, 02:05 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