Closed Thread
Results 1 to 4 of 4

Urgent - Need simple formula for counting number of cells between value

  1. #1
    Registered User
    Join Date
    11-24-2017
    Location
    israel
    MS-Off Ver
    Excel Home and student 2019 for Windows 10
    Posts
    151

    Urgent - Need simple formula for counting number of cells between value

    Hi,

    I please need someone to write out for me the formula which will automatically count the number of cells between a given value in a column (see attached spreadsheet). As an example I have highlighted the value 7. Values in column E represent the number of cells between the value 7 in column D. The number of cells between the value must also include the cell which contains the targeted value. I want to be able to change the formula each time to count each of the eight different values in the column. So please explain to me what I need to change in the formula in order for it to count the gaps for a different targeted value. Please help. This is urgent. Thanks.
    Attached Files Attached Files

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Urgent - Need simple formula for counting number of cells between value

    hi there. try this in cell F1:
    =IF(D1=7,MATCH(7,OFFSET(D1,1,,COUNT(D:D)),0),"")

    copy down

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    11-24-2017
    Location
    israel
    MS-Off Ver
    Excel Home and student 2019 for Windows 10
    Posts
    151

    Re: Urgent - Need simple formula for counting number of cells between value

    Thanks a million.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Urgent - Need simple formula for counting number of cells between value

    This is an old thread but I just happened to run across it. Do not duplicate threads. There were people in the other thread spending time to help when the problem was already resolved in this duplicate.

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Need simple formula for counting number of cells between value
    By jackblack2 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 06-20-2018, 12:16 PM
  2. Very urgent - need help with formulating 2 simple counting formulas
    By jackblack2 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-26-2017, 08:44 AM
  3. Ignore blank cells in formula counting number of different cells.
    By deneh in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-07-2015, 08:52 AM
  4. [SOLVED] URGENT - how do you do simple sums with cells set to date format
    By Muzza86 in forum Excel General
    Replies: 8
    Last Post: 06-25-2014, 07:03 AM
  5. Requesting a simple counting function, pretty urgent (VBA)
    By ssdt in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-18-2008, 08:47 PM
  6. [SOLVED] Formula for counting number of cells
    By Pawan in forum Excel General
    Replies: 2
    Last Post: 02-22-2006, 01:25 AM
  7. Urgent simple formula help
    By pinehead in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-20-2006, 06:10 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