+ Reply to Thread
Results 1 to 7 of 7

SI function incrementation

  1. #1
    Registered User
    Join Date
    09-08-2017
    Location
    Tunis, Tunisia
    MS-Off Ver
    2007
    Posts
    5

    SI function incrementation

    Hello everyone,


    I have an excel table (see the attached file) and I would like to automate the incrementation of column C, I tried this function but there is still a malfunction:


    = SI ($ B5 = "success", REPT ("0", 4-NBCAR (NB.SI.ENS ($ B $ 5: $ B5, $ B5, $ A $ 5: $ A5, $ A5) .SI.ENS ($ B $ 5: $ B5; $ B5; $ A $ 5: $ A5; $ A5); "")


    In fact I tested a solution but it does not work yet and I would like you to do the same thing in the following way on the attached file:


    - Starting from line 10, choosing the "fail" value generates in the column C and in the same row an empty cell


    - Then line 12, the choice of the value "succes", gives as value "0001"
    At this level everything is alright,


    - Then for line 11, the choice of "success" gives "0001" and the previous value of line 12 changes from "0001" to "0002", this is where the problem arises, usually in line 12 the value should always remain "0001" and line 11 "0002" , and so on


    Note that the test result entry is not done from top to bottom, but it can intervene at any level, for example it can start from line 10 and secondly line 11 etc. as the example described above


    Thank you for repeating the test as described above, and thank you for proposing an adequate solution
    Attached Files Attached Files
    Last edited by seyf1981; 09-08-2017 at 11:45 AM.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: SI function incrementation

    You get better help on your question if you add a small excel file, without confidential information.

    Please also add manualy the expected result in your file.

    To Attach a File:

    1. Scroll down to the window below your post Additional Options
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: SI function incrementation

    I'm sorry, but I don't understand your question. However, I have had a guess...

    in English, the formula in C5 is:

    =IF(B5="","",IF($B5="succes",TEXT(COUNTIF($B$5:B5,"succes"),"0000"),IF($B5="echec",TEXT(COUNTIF($B$5:B5,"echec"),"0000"),"")))

    See sheet for translation into French....
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Registered User
    Join Date
    09-08-2017
    Location
    Tunis, Tunisia
    MS-Off Ver
    2007
    Posts
    5

    Re: SI function incrementation

    This is a full explanation:

    I want to increment cells in column C that depends from value in column B "resultat test". So every time when I pick the value "succes", cells taks value from 0001, 0002,0003,...

    However, if the value in column B is "echec", the cells remains "empty"

    Incrementation should continue this way as well as the year is still 2017 "column A", and should restart from 0001 when the year changes to "year + 1" (2018) of course with the same conditions

    The attached file includes a good exemple (solution based on VBA ) but missing an important thing, it doesn't take into considération the change of the year (check comment on line 17),
    Attached Files Attached Files

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: SI function incrementation

    Try this:

    =IF(B5="","",IF($B5="succes",TEXT(COUNTIFS($B$5:B5,"succes",$A$5:A5,A5),"0000"),""))
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    09-08-2017
    Location
    Tunis, Tunisia
    MS-Off Ver
    2007
    Posts
    5

    Re: SI function incrementation

    Go back to the same exemple,

    1- line 26, choosing "fail" , value generates an empty cell
    2- line 25, choosing "succes", value generates 0001
    3- line 23, chossing "succes", value generates 0001 and the previous one (line 25) becomes 0002 instead of 0001

    error

    values should not be changed when you choose "succes", it depends on time of modification meaning "first in first value, second in second value..." in this example, value on line 25 should remains "0001" not changed to "0002" and line 23 "0001" even if line 23 is ranking before line 25 on the table
    Attached Files Attached Files

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: SI function incrementation

    You will need VBA for this, I think. I'm hopeless with VBA, but can do a workaround, if needed. To be honest, you'd probably be better off closing this thread and re-posting a clear and complete description in the VBA sub-forum.

+ 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. [SOLVED] Easy Date Incrementation in a formula
    By MartinS2016 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-07-2016, 05:35 AM
  2. Calling function inside function. (aka nested function)
    By jakopak in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2015, 05:58 AM
  3. cell incrementation
    By everythingneon in forum Excel General
    Replies: 2
    Last Post: 07-01-2011, 11:00 AM
  4. Help with incrementation
    By s.walsh87 in forum Excel General
    Replies: 2
    Last Post: 07-15-2010, 04:01 AM
  5. Scroller Incrementation
    By unique in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-04-2005, 06:25 PM
  6. [SOLVED] Scroller Incrementation:dynamic chart working,
    By unique in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-04-2005, 11:20 AM
  7. Row incrementation not working.
    By Brian in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-09-2005, 02:06 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