+ Reply to Thread
Results 1 to 6 of 6

Countif from a starting point using offset

  1. #1
    Forum Contributor
    Join Date
    11-22-2020
    Location
    Sydney Australia
    MS-Off Ver
    365
    Posts
    202

    Countif from a starting point using offset

    Hi All,

    in the attached spreadsheet, with the help of Glen Kennedy and Fluff13, in a previous thread, a 6 digit text string is split out into individual characters, one character per column. Thanks again.

    In the data, where ever there is an "x", the values are summed only to the right of the columns where the "x" is. No Problem.

    However, if in the columns to the right of the "x", there is a 0, I need to make an adjustment in the summation. Basically because 0 can actually mean a number anywhere between 10 & 24. 0 is not 0, in this case.

    In column P, using Countif, I can determine how many 0's there are in the 6 digit string text. No Problem.

    But what I really need to count is how many 0's are to the right of the "x". Anything to the left of the "x" is not considered.

    Any ideas would be greatly appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Countif from a starting point using offset

    None of the cells in C3:C17 have a 0 to the right of an x.

    There's a note in cell O2 stating don't calculate if x appears as 5th or 6th character.

    If you want the number of 0s to the right of x when x appears in columns 1 to 4, try

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    where X99 is a placeholder for your actual cell addresses.

  3. #3
    Forum Contributor
    Join Date
    11-22-2020
    Location
    Sydney Australia
    MS-Off Ver
    365
    Posts
    202

    Re: Countif from a starting point using offset

    Hi hrlngrv. That is perfect. Thank you.

  4. #4
    Forum Contributor
    Join Date
    11-22-2020
    Location
    Sydney Australia
    MS-Off Ver
    365
    Posts
    202

    Re: Countif from a starting point using offset

    Posted deleted. I couldn't see the forest for the trees

    Original Post:

    HI hrlngrv, on a separate note, just wondering, once the position of the x is determined, how would you count the number of cells to the right of the x? my formula does not like it when....

    for example
    Len = 3
    x is in column 4

    therefore, there is only 2 cells to the right of x

    cheers
    Last edited by JeffGrant; 01-29-2021 at 02:51 AM.

  5. #5
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Countif from a starting point using offset

    I'm not using the separate columns of individual letters. I don't see any pressing need for them. If cell X99 contained a string of up to 6 characters,

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    where 0 would indicate either no x in X99, or nothing to the right of it (i.e, it's the last character).

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

    Re: Countif from a starting point using offset

    @JeffGrant

    Don't post-edit your posts in this way, please - I have reinstated the original message so that the thread makes sense. Thanks.
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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: 6
    Last Post: 05-28-2018, 01:39 PM
  2. Offset formula starting point (up/down)
    By Daniel86 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-22-2018, 02:40 PM
  3. Starting point
    By Phyxius in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-05-2016, 03:58 PM
  4. Starting Point
    By JT_2111 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-10-2014, 02:45 PM
  5. Index/Match to find Starting Point of Average, Ending Point of Average Variable
    By tgentry in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-09-2012, 01:04 AM
  6. Replies: 2
    Last Post: 06-27-2011, 10:47 PM
  7. Starting point
    By LouP in forum Excel General
    Replies: 1
    Last Post: 05-15-2008, 12:40 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