r/excel • u/mcwhitney • Sep 10 '20
solved Incremental numbering skipping blank cells as part of an IF/AND statement?
I'd like excel to automatically assign a unique number to each new approved grant, while leaving denied grants without a number. The number should indicate the fiscal year plus a sequential number. I've got the formula figured out to get the FY indicated, but I cannot figure out how to make the numbers incrementally increase. The formula I'm using right now is =IF((AND(N6>DATEVALUE("6/30/2019"),N6<DATEVALUE("7/1/2020"))),"FY20-1",IF((AND(N6>DATEVALUE("6/30/2020"),N6<DATEVALUE("7/1/2021"))),"FY21-1",IF((AND(N6>DATEVALUE("6/30/2021"),N6<DATEVALUE("7/1/2022"))),"FY22-1","")))
Here's what the data looks like:
Ideally the FY20 grants would be numbered FY20-1, FY20-2, FY20-3, etc and the same for the FY21 grants. Is this even possible?
First time ever posting on reddit so apologies if I've made some errors here!
Thanks all!
View all comments
Show parent comment
1
u/basejester 336 Sep 11 '20
The amount of user entry and the number of helper columns with formulas is unrelated. It's possible to do this without helper columns, but I question how this is better. In fact, I'd go with a column labeled Fiscal Year and calculate a number to put in that field and then build the concatenate a label based on those discrete parts. But here you go. (Assumes "Approved" appears in column B.)