+ Reply to Thread
Results 1 to 4 of 4

Row number automatication formula

Hybrid View

  1. #1
    Registered User
    Join Date
    10-23-2017
    Location
    Est
    MS-Off Ver
    2013
    Posts
    49

    Row number automatication formula

    Hello,

    Need help with this formula:

    1. I have one column for project and second column for row nr calculation. Formula should calculate number by logic: if itīs first row, then calculate 1, if itīs second row of this project previous row + 1. Problem is sometimes, I need to start not from 1 but for example from 8 (I will manually overwrite formula to 8) and next row should calculate 8 +1 =9. Added excel also.

    Projekt Number
    A 1 I tīs first row for this project, automatically set 1.
    B 8 itīs first row for this project, automatically set 1, but it this project neet to manually change 8
    A 2 itīs second row for this project, set previous number + 1
    A 3 itīs third row for this project, set previous number + 1
    C 1 itīs first row for this project, automatically set 1.
    B 9 itīs second row of this project, set previous number + 1

    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Row number automatication formula

    Please try at C3 and drag down

    =COUNTIF(B$3:B3,B3)+(B3="b")*7

    or

    =AGGREGATE(14,6,N(+C$2:C2)*(B$2:B2=B3),1)+1
    Last edited by Bo_Ry; 01-29-2019 at 06:11 AM.

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,418

    Re: Row number automatication formula

    You can use this formula in C3:

    =COUNTIF(B$3:B3,B3)+IF(B3="B",7,0)

    then copy down. If you have a lot of projects with a starting point other than 1, it would be better to set up a table with those starting points and use VLOOKUP instead of the IF.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    10-23-2017
    Location
    Est
    MS-Off Ver
    2013
    Posts
    49

    Re: Row number automatication formula

    Aggregate formula works fine. Thanks

+ 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: 1
    Last Post: 10-07-2016, 02:16 PM
  2. Replies: 17
    Last Post: 05-16-2016, 01:22 AM
  3. Formula R1C1 for new rows - formula number not equal to row number
    By jokris in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 01-11-2016, 02:45 AM
  4. [SOLVED] formula to auto delete number in dropdown list when number appears in another cell #2
    By ddevins in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-28-2014, 08:31 AM
  5. [SOLVED] formula to auto delete number in dropdown list when number appears in another cell
    By ddevins in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 04-28-2014, 04:54 AM
  6. Replies: 1
    Last Post: 07-18-2013, 10:11 AM
  7. Replies: 1
    Last Post: 01-17-2013, 10:44 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