LibreOffice Calc (date has past coditional formatting) - conditional-formatting

I am building a to do list in LibreOffice. I have one column that describes the task and next to it is the deadline date. I would like any task that is past it's deadline to be a different color. Is it possible to do this using conditional formatting?
Just to clarify. I just managed to work something out by using "if cell value is less than TODAY()" however this only changes the look of the date cell. I also need to change the two cells in front of the date.
Thanks in advanceImage of to do list

Just figured it out. Just selected the entire list and used conditional formatting 'formula is $C2 < TODAY()'. This seems to work fine.

Related

Vertical line showing current week in timeline

Ok so I recently added a vertical line showing the current week in a chart using this method: http://www.officetooltips.com/excel/tips/how_to_add_a_vertical_line_to_the_chart.html
but now I want to add one to a sheet without a chart. Is this possible?
So my timeline looks like this:
Is vba needed or is this possible with formulas I really have no idea.
You can make it auto update every week using NOW() formula:
What you have to make sure is that each column is formatted based on the cell in row A (or any other row/column) so you format all cells based on the dates in the first row. To look from each cell to the second row you use OFFSET($A$1,1,COLUMN()-1) and get the relevant date for this column. This could be done for any other cell that holds the relevant date for the column, but there must be one like this. The condition in the figure is one for all the table.
EDIT:
To match the format of YYMM for the date, use the formula (assuming $D$2 is the upper left cell of the table):
=OFFSET($D$1,1,COLUMN()-COLUMN($D$1))=RIGHT(YEAR(NOW()),2)*100+WEEKNUM(NOW())
for the current week, or replace the NOW() in it with a cell with the date of interest.
Hope it solves your problem ;)

Highlight duplicates not next to each other using conditional formatting (Larger Dataset)

We have a list of product numbers in Excel in a certain order. For reasons I won't get into, we need to highlight when there are duplicates that aren't next to each other.Currently, I'm using this formula in a conditional format to do the job.
=AND(COUNTIF($A$2:$A$82,$A2)>1,$A1<>$A2,$A2<>$A3)
This mostly works well except in cases where there are pairs of duplicates like in the example below, we would want FO-1694 to be highlighted, because they aren't all next to each other. But we would not want NIS0257 to be highlighted because they are.
Currently
Ideally, this is what we want to see...
Expected
I originally asked this same question January 30th (link) and I received what seemed to be a working solution with the conditional formatting formula
=NOT(AND(A2=OFFSET(A2,COUNTIF($A2:$A$82,A2)-1,0),A2=OFFSET(A2,-(COUNTIF($A$2:$A2,A2)-1),0)))
While this original answer appears to work for a small group of data (example), it does not function as needed on much larger datasets like the ones I'll be dealing with (images below are of the issues with the larger dataset). I've adjusted the formula as necessary to accommodate the larger range, so the conditional formatting formula you see in the larger dataset pictures & file is
=NOT(AND(A2=OFFSET(A2,COUNTIF($A2:$A$5422,A2)-1,0),A2=OFFSET(A2,-(COUNTIF($A$2:$A2,A2)-1),0)))
Cells with the arrow pointing at them should be highlighted
For the last picture, even though it's the end of the range the cells should still be highlighted since they're blank and I need all blank cells in the range to be highlighted too.
The full file with the larger dataset can be downloaded from my dropbox account using this link.
I should have thought of those problems:
=NOT(AND(IFERROR(COUNTIF(OFFSET(A1,0,0,-COUNTIF($A$1:$A1,A2)),A2),0)=IFERROR(COUNTIF($A$1:$A1,A2),0),IFERROR(COUNTIF(OFFSET(A3,0,0,COUNTIF($A3:$A$5422,A2)),A2),0)=IFERROR(COUNTIF($A3:$A$5422,A2),0),A2<>""))
Should do it.
I'm not sure if this would work for you
=IF(COUNTIF($A$1:$A$8,A2)>2,1,IF(AND(COUNTIF($A$1:$A$8,A2)=2,A1<>A2,A3<>A2),1,0))
I've tested it on a test bit of data, and seems to work. You need to check for the 1st row, as you cant check the previous cell, so the A1<>A2 part..
1 being true condition on my test so would need tweaking for conditional formatting.
Enjoy.

Have Excel Check Cell format at every Change

I have a VBA code that helps users schedule projects by entering either a date or days until completion for particular tasks and then creates a graph that shows the percent completion of the project.
The VBA code hinges on the formatting of the cell to perform its calculations. Excel does a great job of choosing a number or date correctly the first time a user inputs a value. However if a user was to input a date and then decide to input a number (ex: 7) they would end up with 1/7/1900 as the date, which then makes excel perform the VBA incorrectly.
Is there a way to get Excel to "reconsider" the formatting of the cell each time it is changed? If not is there a way to force it to do so in VBA and choose either number or date formatting only?
Thanks,
-MK
Yes,
as a user prefixing an "=" is probably your best bet.
Adding "e0" on the end will format as an ugly scientific number, but at least it's accurately represented in memory.
Another option is multiplying by 100 followed by a "%".
You've accurately noticed that dates to numbers don't change back as easily. On the other hand any entry with a front-slash '/' seems to format as a date pretty reliably. The single apostrophe ' formats as Text, which is not very good for automated solutions. A number by itself is too general to change the NumberFormat, so any "automatic" solution would be non-standard.

Count colored cells with a VBA function and output number of hits?

I have a simple time schedule sheet that we use to keep track of who is working when. It is simple a set of cells covering 24h, where each cell is representing 15 minutes.
There all kan mark when they have worked during the day by just fillng the cells with "their" color.
We have up to four ppl working every day, and I wan't to have an automatic summary of the number of hour they've worked everyday. Right now I have a separate column for each emplyee and besid every day, where I manually fill in the time, but I would like to have this done automatically whenever day fill in their color.
Is that even possible? Anyone got any hints on this to help me forward?
Thanks in advance,
Hmb
Thanks for the link to the other thread here at stackoverflow, must have missed it when I tried to look for an answer.
I also found a premade library with coloring functions and alot of explanations about how to use (and not) color-functions in Excel.
http://www.cpearson.com/excel/Colors.aspx
After trying it out I got it all working, and now have a sheet that automatically calculate the times for every person from they colored cells! :)
/Hmb

how to multi conditionally sort values using vba

So I'm pulling data from an external source which returns Date strings of the given format: "10/26/2013 9:46:46 AM"
When I sort the data it does not seem to be able to distinguish between AM and PM values so many noonish / 1 AM values are moved towards the bottom. Has anyone dealt with this before / have a solution to make it recognize the AM/PM aspect along with the day and time?
Thanks
It looks like it is sorting this as text. It may depend on how the data is getting pulled through.
If you select one of the cells and press F2 (to edit) then enter to go to the next cell, does this change your data?
In the code that is pulling the data through, you just need to amend it slightly.
Range("D5").value = string
It may change it slightly to maybe 24 hour time depending on your computer settings
I ended up just splitting the date and time using TimeValue() and DateValue() excel functions.I then wrote a macro to do a 3 key sort based on ticker, date, and then time.