Forum Discussion
jaolvera
Aug 15, 2023Brass Contributor
Excel Formula
Hello I am needing help with calculating a formula that will tell me if some is a resident, and over the age of 65 and has received 2 bivalent boosters (either moderna Bivalent or Pfixer bivalent) ...
HansVogelaar
Aug 15, 2023MVP
In a cell in row 2:
=AND(E2>65, G2="Resident", SUM(COUNTIF(W2:AB2, {"Moderna", "Pfizer Bivalent Booster"}))=2)
If you don't want to include the first shot, use Y2:AB2 instead of W2:AB2.
Fill down.
jaolvera
Aug 15, 2023Brass Contributor
okay this might make it more complicated, but essentially I am trying to calculate if the person is over 65 and its been 4 months since their first bivalent booster. trying to determine who is "up to date"
- HansVogelaarAug 15, 2023MVP
Since the first bivalent booster or the last?
- jaolveraAug 15, 2023Brass Contributorsince first bivalent.
- HansVogelaarAug 15, 2023MVP
It's confusing. Does this do what you want?
=IF(AND(E2>65,G2="Resident"),LET(m,MATCH(1,(W2:AA2="Moderna")+(W2:AA2="Pfizer Bivalent Booster"),0),IF(ISNUMBER(m),IF(INDEX(X2:AB2,m)<EDATE(TODAY(),-4),"First bivalent booster more than 4 months ago","First bivalent booster 4 months ago or less"),"No bivalent booster")),"Not eligible")