Skip to main content
Question

Calendar color coding formula help


When adding this formula to my calendar, it is adding an empty space above my text. It is coloring the data correctly, but the extra line is making it unusable.

If([Project Owner]="Larry","<div style=background-color:#f6ff00;\">" &"<b>" &[Planned Project]&"",
[Project Owner]="Sam","<div style=background-color:#03aff9;\">" &"<b>" &[Planned Project]&"",
[Project Owner]="Joe","<div style=background-color:#f90404;\">" &"<b>" &[Planned Project])


This is what it looks like when displaying:




As you can see each entry has a blank one above it. This is what it looks like if I don't use my formula, and only put in the [Planned Project]. This doesn't have the excellent color coding, but the information is all on one row as it should be... Any help would be much appreciated!

This topic has been closed for replies.

Venturing a guess without experimenting, but I wonder if you close your <b> tags if that might help?

  • Registered
  • April 28, 2017
also venturing a guess without time to test, but try adding some type of padding element to the div

padding:7px;

  • Author
  • Registered
  • May 3, 2017
I tried both of those suggestions, it still doesn't seem to help. Now that I am thinking it through, I am wondering if it can't color since the events go across multiple dates??? Has anyone created a calendar that could color code different events across multiple days or weeks? For instance, if we wanted to say that the Mothers day banner will be on a website from 4-15 to 5-14, but we would have multiple other one day launches or specials color coded differently on single days. I thought my formula would handle that, but I'm not sure if the calendar functionality can display it the way I am needing it to.

  • Author
  • Registered
  • May 8, 2017
[SOLVED]!!!! After reading up on a few other questions, I replaced "div style" with "span style" in my formula, and it worked!!! It still won't allow coloring across multiple days, but it did remove the spaces and the extra line. 

Thank you all for the help and suggestions.