Good day to you all. Please excuse me as I’ve never actually asked a question here before, though it’s been a wonderful resource.
I use Excel a fair amount, but I’ve never gotten into charts. What I am trying to accomplish is a chart that is the height of the data source, showing bars across a 24 hour period based on a start time and end time. The bar should be color coded based on the customer, for which there are currently three. Hopefully, I added the image below correctly.
Range Data
The way I’ve done this up to now is by using around 93,000 formulas to determine whether a number from a hidden formula is within the time range, and coloring the cell based on the outcome with autoformatting. See my formula below. As you can imagine, this makes for a usable, but very cumbersome excel file that sometimes takes a while to load or make edits.
Current “Chart” Example
There is a cell for every minute of the day for 65 rows. Each formula looks similar to this:
=IFS(AND($C4<=CU$2,$D4>=CU$2,$E4="TOYOTA"),1,AND($C4<=CU$2,$D4>=CU$2,$E4="HONDA"),2,AND($C4<=CU$2,$D4>=CU$2,$E4="SUBARU"),3,TRUE,"")
The top row has a formula like this for every minute that is used in the rest of the sheet:
=BR2+(1/1440)
My apologies. I’m pretty sure I copied the formulas from two different columns. Basically, it checks that the result from the “time line” is between the start and end times and comes up with a 1,2,or 3 result, which then autoformat uses the color the cell. It’s a mess, but it does work…eventually.
I figure that there must be a better way. I was hoping that this could be done with a chart, but I have little to no experience with charts. If anyone is interested in the file referenced here, I’ll find a way to share it. It does not currently contain any macros, but I am not opposed to their use. I apologize for being over-worded, and I thank you for any assistance or comments you may have in advance.
ShiningN1ght is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1