I have a function which I inherited and have subsequently changed and adapted for other spreadsheets.
The function layout is:
=IF(ROWS($A$2:$A3)>COUNTIF('A'!$E:$E,"nnnnn"),"",INDEX('A'!A$2:A$998,SMALL(IF('A'!$E$2:$E$998="nnnnn",ROW('A'!$E$2:$E$998)-ROW('A'!$E$2)+1),ROWS($A$2:$A3))))
The function searches worksheet A (in this case, a list of all staff members) and determines which department and role (nnnnn) the staff member belongs to, then updates another worksheet, relevant to that department and role (there are about 10 worksheets) with that data for that cell IF it isn't already present on that sheet.
This works perfectly, until a row is deleted from the source sheet, in which case, each cell in all of the other sheets returns an error.
This can be overcome by blanking out all of the data in that row, but this sheet is for another member of staff to use so I would prefer it if they could have the option to just delete rows when a member of staff leaves.
Is there anything I can add to the function to allow for rows to be deleted?
I am not able to use VBA, hence the convoluted function and I therefore need a solution using the function
Regards
Bookmarks