+ Reply to Thread
Results 1 to 3 of 3

how to obtain consecutive non-zero values from range

  1. #1
    Registered User
    Join Date
    03-18-2015
    Location
    Mars
    MS-Off Ver
    2013
    Posts
    2

    how to obtain consecutive non-zero values from range

    Hi
    I have the following set of data in a column that are a result of an if statement.

    5
    0
    0
    0
    0
    0
    0
    9
    0
    0
    0
    13
    0
    0
    0
    0
    0
    0
    27
    0
    0
    0
    0

    I want to get the following results

    Range 1
    From 5
    to 9


    range 2
    from 13
    to 27

    the number of ranges depends on the number of non zero items divided by 2. This I have done using countifs but how to retrieve the values using a formula.

    Thank you for the help
    Last edited by locobaloco; 03-18-2015 at 03:01 PM.

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

    Re: return values

    Hi, welcome to the forum

    1st, Please take a moment to read the forum rules and then amend your thread title to something descriptive of your problem - not what you think the answer might be. (think google search terms?). Once you have done this please send me a PM and I will remove this request. (Also, include a link to your thread - copy from the address bar)

    Many members search our previous posts, and thread titles play a big part of the search. I doubt anybody would do a search based on your title?

    To change a Title on your post, click EDIT POST then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    2nd, Please upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.

    3rd
    This I have done using countifs but how to retrieve the values using a formula.
    countifs IS a formula?
    Maybe show what you did?
    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
    Registered User
    Join Date
    03-18-2015
    Location
    Mars
    MS-Off Ver
    2013
    Posts
    2

    Re: how to obtain consecutive non-zero values from range

    thanks for the tips
    I have managed to solve the problem
    but cant figure out how to delete the thread

+ 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. Replies: 3
    Last Post: 12-13-2013, 06:23 AM
  2. [SOLVED] Return value if within range, return multiple values if ranges overlap
    By cde1983 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-17-2013, 06:16 AM
  3. Replies: 1
    Last Post: 07-03-2013, 12:14 AM
  4. Replies: 2
    Last Post: 11-12-2012, 06:26 AM
  5. Store cell values in an array and return values on specific condition
    By gmalpani in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 11-27-2011, 06:43 AM

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