Keebler
Board Regular
- Joined
- Dec 1, 2021
- Messages
- 176
- Office Version
- 2021
- Platform
- Windows
SO, what I am needing is either a formula or VBA here is the criteria
there is a range of dates in column A
then there is a category (for example a MH group for Depression that I oversee/teach)
I have tried a formula
=MAXIFS($A$2:$A$101,$B$2:$B$101,$DF$2) this produces circular references
(df2 is the category name and is referenced in a vlookup formula in column A)
(I think the circular reference is coming from the range in column A including the current
row. - i'll try a ranging option that only counts rows prior to the "current" one before
posting this query)1
what I need is for when (this example) the depression group gets entered in column B that a
NEW date will be entered in column A that is a specific number of days (seven in this case)
past the most recent date. The caveat is that the depression group is NOT the only category
of entries for column B. there may be may be as many as 20 different categories each with
different date requirements. Each of the date requirements can be in a separate area of the
spreadsheet that can be referenced by either the formula(s) or VBA. the date requirements
can and usually changes as time evolves.
right now it does not matter if the date produced is in the future, but historically the
category and date are entered post event.
--
1 I added the following formula "=COUNTIF($A2:$A100,"<>")+1"
this produced the correct last line number "13"
however, when i created the dynamic range addresses
using these I wrote
=MAXIFS(INDIRECT("$DD$2"),INDIRECT("$DD$3"),$DF$2)
this then produced
1/0/190 which is incorrect
there is a range of dates in column A
then there is a category (for example a MH group for Depression that I oversee/teach)
I have tried a formula
=MAXIFS($A$2:$A$101,$B$2:$B$101,$DF$2) this produces circular references
(df2 is the category name and is referenced in a vlookup formula in column A)
(I think the circular reference is coming from the range in column A including the current
row. - i'll try a ranging option that only counts rows prior to the "current" one before
posting this query)1
what I need is for when (this example) the depression group gets entered in column B that a
NEW date will be entered in column A that is a specific number of days (seven in this case)
past the most recent date. The caveat is that the depression group is NOT the only category
of entries for column B. there may be may be as many as 20 different categories each with
different date requirements. Each of the date requirements can be in a separate area of the
spreadsheet that can be referenced by either the formula(s) or VBA. the date requirements
can and usually changes as time evolves.
right now it does not matter if the date produced is in the future, but historically the
category and date are entered post event.
--
1 I added the following formula "=COUNTIF($A2:$A100,"<>")+1"
this produced the correct last line number "13"
however, when i created the dynamic range addresses
2024.xlsm | |||||
---|---|---|---|---|---|
DB | DC | DD | |||
1 | 13 | ||||
2 | $A$13 | $A$2:$A$13 | |||
3 | $B$13 | $B$2:$B$13 | |||
DATA |
Cell Formulas | ||
---|---|---|
Range | Formula | |
DB1 | DB1 | =COUNTIF($A$2:$A$100,"<>")+1 |
DB2 | DB2 | =ADDRESS($DB$1,1) |
DB3 | DB3 | =ADDRESS($DB$1,2) |
DD2 | DD2 | ="$A$2:"&$DB$2 |
DD3 | DD3 | ="$B$2:"&$DB$3 |
using these I wrote
=MAXIFS(INDIRECT("$DD$2"),INDIRECT("$DD$3"),$DF$2)
2024.xlsm | |||
---|---|---|---|
DG | |||
2 | 1/0/1900 | ||
DATA |
Cell Formulas | ||
---|---|---|
Range | Formula | |
DG2 | DG2 | =MAXIFS(INDIRECT("$DD$2"),INDIRECT("$DD$3"),$DF$2) |
this then produced
1/0/190 which is incorrect
Last edited: