+ Reply to Thread
Results 1 to 8 of 8

Array formula to help comparison of points

  1. #1
    Forum Contributor
    Join Date
    10-05-2016
    Location
    orange, ca
    MS-Off Ver
    0365 2209
    Posts
    144

    Array formula to help comparison of points

    Hi all

    I have data where I am comparing points, specifically I labeled points 1,2,3...and have a formula to compare point 1 to 1, 2 to 2, and so on. However, sometimes a group of numbers don't have the same number of points. For an example a trend can have 4 points and the previous trend has 3 points. In this scenario, I like to compare point 4 to point 3 (in other words, if there is no corresponding point in the previous trend, compare to the last point of the trend). I have included a screenshot and download for example. As you see I have an array formula in column G and highlighted in yellow is a point 4, but is it blank. What array formula can I use to accomplish the task I looking for?

    screenshot 11216.png
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Array formula to help comparison of points

    What answers are you expecting?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    10-05-2016
    Location
    orange, ca
    MS-Off Ver
    0365 2209
    Posts
    144

    Re: Array formula to help comparison of points

    in the yellow, I expect to see 6.6% which is point 3 of the previous trend. However, my formula is blank here because I was only able to program the formula to look for the same point, which in this case there is no previous point 4.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,568

    Re: Array formula to help comparison of points

    What about amending the array entered formula in G5 as follows:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Forum Contributor
    Join Date
    10-05-2016
    Location
    orange, ca
    MS-Off Ver
    0365 2209
    Posts
    144

    Re: Array formula to help comparison of points

    That worked JeteMc. I did modify the trend in the new attachment (sorry should have done that in the beginning) because there are scenarios like this where there can be 2 points 4s, although in this scenario I don't want it to compare to the 2.5% in yellow because that is not part of the previous trend (the number should still be 6.6% here).
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,568

    Re: Array formula to help comparison of points

    Here is a 'Helper Column' solution that may inspire someone to provide 'Single Formula' solution, but at least you'll have a fall back until then.
    The helper column (I) is populated by the formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    The formula that populates column G is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Let us know if you have any questions.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    10-05-2016
    Location
    orange, ca
    MS-Off Ver
    0365 2209
    Posts
    144

    Re: Array formula to help comparison of points

    thank works, I will mark thread as solved, thank you

  8. #8
    Forum Contributor
    Join Date
    10-05-2016
    Location
    orange, ca
    MS-Off Ver
    0365 2209
    Posts
    144

    Re: Array formula to help comparison of points

    actually found a way to use single array formula starting in g5

    =IFERROR(INDEX(A:A,IF(C5>3,IF(SMALL(IF(C$5:C$31=C5,IF(C5>0,ROW(A$5:A$31))),COUNTIF(C$5:C5,C5)-1)>SMALL(IF(C$5:C$31=C5-1,IF(C5>0,ROW(A$5:A$31))),COUNTIF(C$5:C5,C5-1)-1),SMALL(IF(C$5:C$31=C5,IF(C5>0,ROW(A$5:A$31))),COUNTIF(C$5:C5,C5)-1),SMALL(IF(C$5:C$31=C5-1,IF(C5>0,ROW(A$5:A$31))),COUNTIF(C$5:C5,C5-1)-1)),SMALL(IF(C$5:C$31=C5,IF(C5>0,ROW(A$5:A$31))),COUNTIF(C$5:C5,C5)-1))),"")
    Attached Files Attached Files

+ 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. Counting points in array boxes
    By JohnnyB59 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-27-2015, 09:35 PM
  2. Calculating all possible planes from an array of (x,y,z) points
    By yanivb in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-20-2015, 01:05 PM
  3. How to count occurrences of a comparison within an array
    By jbh001 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-28-2014, 09:43 AM
  4. How to plot a comparison of only 3 points against 9 in graph
    By karryan in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-28-2014, 04:04 AM
  5. Find latest period, add to Array, do some comparison (trader oriented)
    By hgtenn in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-21-2011, 05:31 PM
  6. Comparison between comma'ed list and array
    By Miraun in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-07-2009, 05:06 PM
  7. Randomized Paired Comparison Array
    By John Michl in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-20-2005, 06: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