+ Reply to Thread
Results 1 to 10 of 10

Formula to Count sequentially adding 1 if previous two row/column criteria don't match

  1. #1
    Registered User
    Join Date
    06-28-2023
    Location
    Kansas, USA
    MS-Off Ver
    Office Pro 2019
    Posts
    5

    Formula to Count sequentially adding 1 if previous two row/column criteria don't match

    What im trying to accomplish is: Formula to count sequentially, adding 1 if previous two row/column criteria don't match, otherwise if a match, then repeat the same #.
    I feel like I'm close to getting this to work, but I'm not fully understanding the function of it fully. I found something with a google search that got me in the general direction I need to go. Potentially could save me hours on these data spreadsheets for parent contact info, albeit I've already spent over an hour trying to get it to work properly for my scenario.

    heres a sample of a formula I found: =IFERROR(VLOOKUP(IF(G13="",E13,G13),IF(G13="",$B$1:$E12,$B$1:$G12),IF(G13="",4,2),0),MAX($B$1:B12)+1)

    Let me know what you think.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,868

    Re: Formula to Count sequentially adding 1 if previous two row/column criteria don't match

    Try this,

    B2
    Please Login or Register  to view this content.
    copied down.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    06-28-2023
    Location
    Kansas, USA
    MS-Off Ver
    Office Pro 2019
    Posts
    5

    Re: Formula to Count sequentially adding 1 if previous two row/column criteria don't match

    Hmm, that counted sequentially but didnt give matches the same # like I was hoping.
    I could just do it manually, i've only got 360ish lines in the elementary file, still have middle school parents and high school parent files to do.
    Edit: wait nevermind, i downloaded the spreadsheet and copied your the cell and it seemed to go fine now
    thanks much!
    Last edited by atjones44; 06-28-2023 at 11:46 AM.

  4. #4
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,868

    Re: Formula to Count sequentially adding 1 if previous two row/column criteria don't match

    You are welcome.
    --------------------------------------
    If that takes care of your original question, please click on "Thread Tools" from the menu link above and mark this thread as SOLVED.

  5. #5
    Registered User
    Join Date
    06-28-2023
    Location
    Kansas, USA
    MS-Off Ver
    Office Pro 2019
    Posts
    5

    Re: Formula to Count sequentially adding 1 if previous two row/column criteria don't match

    Since I need to go further than 100 rows down,
    Im changing: =IF(E2="","",IFERROR(INDEX($B$1:$B$100,(MATCH(E2&G2,$E$1:E1&$G$1:G1,0))),IF(ISNUMBER(B1),B1+1,1)))
    to =IF(E2="","",IFERROR(INDEX($B$1:$B$500,(MATCH(E2&G2,$E$1:E1&$G$1:G1,0))),IF(ISNUMBER(B1),B1+1,1)))
    and it breaks the thing when copied down...what gives? The matching quits working and it just continues to count sequentially.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,868

    Re: Formula to Count sequentially adding 1 if previous two row/column criteria don't match

    I think it's version problem remove all "@" symbol.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by windknife; 06-28-2023 at 12:16 PM.

  7. #7
    Registered User
    Join Date
    06-28-2023
    Location
    Kansas, USA
    MS-Off Ver
    Office Pro 2019
    Posts
    5

    Re: Formula to Count sequentially adding 1 if previous two row/column criteria don't match

    Thanks!
    That did it, it's weird though since the formula copied over doesnt exactly work, but when I copy the cell from your file into my file, and copy down it works fine.
    The cell from your file has a preceding { symbol and ends with }, and when I go up in the formula bar to copy just the formula, those "{}" go away, and if i just copy the formula, it doesn't work like it does in your sheet.
    Cant figure it out for the life of me. But your file works, and copying the cell works into my original spreadsheet.
    Attached Images Attached Images

  8. #8
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,868

    Re: Formula to Count sequentially adding 1 if previous two row/column criteria don't match

    Please, Committed with Ctrl+Shift+Enter after inputing formula.

    I used Office 365. I forgot to check whether it is array foruma.

  9. #9
    Registered User
    Join Date
    06-28-2023
    Location
    Kansas, USA
    MS-Off Ver
    Office Pro 2019
    Posts
    5

    Re: Formula to Count sequentially adding 1 if previous two row/column criteria don't match

    OH I got you now.
    Thanks for that.

  10. #10
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,868

    Re: Formula to Count sequentially adding 1 if previous two row/column criteria don't match

    You are welcome.

+ 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] Formula to sum every 2 columns based on criteria found in previous column
    By PaulM100 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 07-02-2018, 05:08 AM
  2. [SOLVED] Adding a Count function to Offset, Match formula
    By JO505 in forum Excel General
    Replies: 11
    Last Post: 05-13-2015, 05:52 PM
  3. count text sequentially in a column
    By blueorchid in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-18-2015, 11:05 AM
  4. Count text sequentially in a column
    By blueorchid in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-18-2015, 03:37 AM
  5. [SOLVED] count cells that match criteria of a row and column
    By krazyhype19 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-27-2014, 04:23 AM
  6. Summing previous cells sequentially based on criteria
    By Madridi in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-12-2014, 01:15 PM
  7. Replies: 3
    Last Post: 08-09-2010, 09:07 AM

Tags for this Thread

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