Forum Discussion
How to make excel add or remove rows to fit data and prevent spill error?
without macros or scripts you can't add/remove rows.
Your best bet is to do Harun24HR​ third suggestion and to build the ENTIRE sheet in a single formula
The formula will get large but you will be able to stack it the way you want. so something like:
=LET(data, dataTable, members, list_of_Family_members,
count, ROWS(members),
header, ["MEDICATION NAME","DOSE","FREQUENCY","TIME TO TAKE"],
out, REDUCE("", SEQUENCE(count), LAMBDA( p, q, VSTACK(p, "FAMILY MEMBER " & q, header, FILTER( CHOOSECOLS(data, 2,3,4,5), CHOOSECOLS(data, 1)=INDEX(members, q), ""), "") ) ),
IF(out="","",out)
)in line 1 would be reference to the data source (assuming 1 source) and a list of the family members (and this automatically expands to more or less than 3 family members. I don't understand how your checkboxes work if there is 1 source and no family name so why not just make that first column the family member name or number.
BTW, this is off the top of my head and untested since I don't have a sample sheet to try it on, presented as a conceptual idea of how to do it. In another words there may be typos that need to be cleaned up but gives you an idea of how it could work.