LibreOffice Calc Conditional Date Magic
February 28, 2015 6:54 PM   Subscribe

Wondering if some conditional work with dates, working across multiple sheets, is possible in LibreOffice Calc.

I make assignments to a small group of people on a regular basis, and I have a spreadsheet I'm using to keep track of the assignments. I'm also using it as a way to learn what LibreOffice Calc can do. So I thought I'd ask if it can do this:

Column E in Sheet 1 contains the names of the people who are part of the organization.

Column A in Sheet 1 contains dates. These are the dates they last took an assignment.

What I'd like to do is display in Sheet 2 the 10 people who least recently took on an assignment, along with the date they (long ago) accepted an assignment. My idea is to use this to more fairly balance out the assignment-giving, without having to mess with the information on Sheet 1.

Possible? Thanks!
posted by circular to Computers & Internet (3 answers total)
 
You'd likely have to use scripting to do this, as I'm not aware of a built-in feature that would easily allow this. Do you have programming experience?
posted by thegears at 5:43 AM on March 1, 2015 [1 favorite]


If the spreadsheet is already sorted (say alphabetically on names in column E), you could
1. Edit/Select All Data/Sort-Column A Ascending
2. Make your assignments, modifications, etc
3. Edit/Select All Data/Sort-Column E Ascending --to get the original order back.
posted by hexatron at 7:02 AM on March 1, 2015 [1 favorite]


thegears, yes, I do have programming experience. What I need to do seems like:

foreach (cells as cell) {
var=days(now(), cell) //find difference in days between cell date and now
if var > 120 //more than 120 days have passed {
append cell’s E column to sheet 5 B column
append cell’s A column to sheet 5 B column
}
}

I found the days function in the docs, so maybe I'll just slog through and see if I can find what I need.

And hexatron, thank you for the tip. It is sorted alphabetically, so that might work.
posted by circular at 5:51 PM on March 1, 2015


« Older How not to get on your supervisor's bad side   |   Google Groups user selective post views Newer »
This thread is closed to new comments.