Hello, I am trying to determine how I can display my next available folio number on a spreadsheet. The numbers start at 2018-001 and go indefinitely until the year is over and then start at 2019-001 and go indefinitely until the end of the year. I found the formula below on another thread and it has the basic idea but it is trying to start at 1. I am also unsure how to adjust it because my folio numbers have "-" in them. Does anyone know if what I am trying to do is possible?

=IFERROR(INDEX(ROW(INDIRECT(MIN(A:A)&":"&MAX(A:A))),MATCH(0,INDEX(COUNTIF(A:A,ROW(INDIRECT(MIN(A:A)&":"&MAX(A:A)))),),0)),MAX(A:A)+1)