I'm trying to add to spreadsheet I made a couple of years ago. I need to tweak a formula to put something similar-ish in another cell. I know what the formula ends up producing but can't remember how it works.
Can anyone translate each of the steps in this for me please?
=IFS(HLOOKUP(TODAY(),HABITS,19,FALSE)="",HLOOKUP(TODAY()-1,HABITS,20,FALSE),
HLOOKUP(TODAY(),HABITS,19,FALSE)="n",0,
HLOOKUP(TODAY(),HABITS,19,FALSE)="y",(HLOOKUP(TODAY()-1,HABITS,20,FALSE)+1))
HABITS is a Name.
Columns are dates
Cells in row 19 are blank or y or n
Row 20 are numbers. (In case it's relevant, the formula in row 20 counts how many y I've just had without a gap in row 19.)
If today's cell in row 19 contains y, the formula generates the number in today's row 20.
If today's cell in row 19 contains n, the formula generates 0
If today's cell in row 19 is still blank, the formula generates the number in yesterday's row 20.
If I can understand how this formula works, I'll be able to build my new one - I hope!
I'd be grateful if someone could translate each bit for me. Thank you.
Clare
Can anyone translate each of the steps in this for me please?
=IFS(HLOOKUP(TODAY(),HABITS,19,FALSE)="",HLOOKUP(TODAY()-1,HABITS,20,FALSE),
HLOOKUP(TODAY(),HABITS,19,FALSE)="n",0,
HLOOKUP(TODAY(),HABITS,19,FALSE)="y",(HLOOKUP(TODAY()-1,HABITS,20,FALSE)+1))
HABITS is a Name.
Columns are dates
Cells in row 19 are blank or y or n
Row 20 are numbers. (In case it's relevant, the formula in row 20 counts how many y I've just had without a gap in row 19.)
If today's cell in row 19 contains y, the formula generates the number in today's row 20.
If today's cell in row 19 contains n, the formula generates 0
If today's cell in row 19 is still blank, the formula generates the number in yesterday's row 20.
If I can understand how this formula works, I'll be able to build my new one - I hope!
I'd be grateful if someone could translate each bit for me. Thank you.
Clare