r/excel•
propellhatt

How can I automatically purge older entries in a column, and use an IF function to check one date against multiple others?

unsolved

I work in the tower of a small, Norwgian airport and we need to create a spreadsheet that helps us keep track of our currency, with regards to shifts worked and training completed. Excel is not my primary, or secondary competency, or something I dive deep into often, if at all, but now I need help with some (to me at least) advanced stuff.

I have a column, B, where I input dates, these representing shifts worked. I have a cell, currently E21 where I sho the date where a person will no longer be certified to work if absent until that date, but will then require supplimentary training. The requirements is 20 or more shifts during the last 3 months. Exceptions are if the person was certified for the first time within the last three months, or if supplimentary training has been performed during the last three months.

Okay, so here's what I need to do:

​

  1. In column B, is there a way to automatically add an empty cell on top for date input and move the rest down after inserting a date without having to do this manually?
  2. I don't want to keep entries older than 6 months, due to this spreadsheet rolling over year changes, is there a way to automatically purge those cells containing dates older than 6 months?
  3. I also need a sort of IF-function where I can control against the dates for initial certification and supplimentary training. Let's say these dates have been input in cells I34 and I37. If these dates are within the last three months, the date shown in E21 should be the most recent of these two +3 months. If neither is within the last three months, then the date in E21 should be the date 3 months after the 20th most recent shift entered. This single thing I've currently got working, using several steps, it's not pretty but it works. Adding the control against the two other dates, however, complicates things greatly and I don't know how to do it.
  4. I'd also like to have a table where I add up the number of entries per month. Currently I've got that working using some improvised stuff with hidden columns and such, but it's not particularly elegant. Is there a better way to do it?

I realize this is a big one, but any and all help is much appreciated. Thanks.

Link to a google disk version of my spreadsheet. I've made it in Excel, so this causes some formatting messups in google. I've done some translation, so it should be more or less easily understood.

Posted May 9, 2020, 10:52 AM UTC

13
excelevator2046•

This is a very messy spreadsheet that seems to not quite know what it is doing...

Is it for an individual, or for multiple people?

You never delete data, you will want the historical records at some point.

For recording the data I would consider a table with the year dates along the top and employee names down the side, flagging the workdays with a standard value, either 1 or Y or similar for easy querying. You can freeze the column at the username so it is still visible as you drag across to the records.

This allows for a dashboard to be developed to dynamically update as you enter records.

You could then use conditional formatting to dynamically highlight the certification date for each person.

No VBA required at all.

1
barelysentient-2•

I think you need to use VBA rather than a code. Try asking r/VBA.

0
propellhattOP•

Okay, thanks, I'll try posting over there as well.

1