Ok people. Let me tell you that this post is almost not about Excel. It is about how one Excel blogger’s (yours truly) dream of long distance cycling came true. So sit back, grab your favorite drink and read between sips.
PS: if you just want to see the dashboard, click here.
So what is this all about?
Last Sunday (27th July) & Monday (28th), I finished my first ever 200KM bicycle ride. I rode for a little more than 12 hours, burned 5,179 calories & rode 206 kilometers.
It is definitely one of the most memorable, tiresome & uplifting experiences in my life. So naturally, I want to share the story with you.
Where it all began
Around late last year, I read a book called Free Country by George Mahood. It is a story of two young British lads cycling from Lands End to John O’ Groats (from one end of Britain to another) without spending a penny of their own money. While reading the book, I kept thinking, ‘I should do something mildly similar one day’.
But I did not do much cycling in the next several months. Until…,
I read truly inspiring story of how adc cycled from Manali to Leh (500 km). The story is special because the terrain between Manali & Leh is filled with high altitude passes, dangerous mountain roads, harsh weather, almost no habitat & breath taking scenery.
That travelogue motivated me enough to get out my dusty cycle from garage and start riding it.
Soon I was riding 20 KM per day. I started doing a few long rides (~40km) in the weekends to build strength.
Once I felt confident, I discussed my plans for a longer ride with Jo (my wife). She was a little apprehensive as I have never done something like that and long rides could mean increased chance for injury or accident.
Finally we agreed that doing a round trip to Annavaram (a small temple town 118 km away from our home) would be reasonable. The roads to Annavaram are in excellent condition. There is ample help available all the way (plenty of food stops, villages & towns along the way). Plus in case of fatigue or injury, I could easily hitch a ride back home.
I fixed on the dates 27 & 28th of July for ride. Weather app on Jo’s iPad said there is 70% chance of rain. I kept my plans fluid & wanted to ride only if there is no rain in the morning when I started.
Route Map
Here is the route I took (link).
Day 1 – Vizag to Annavaram (118 km, 7:34 hrs riding)
I woke up at 4:45 AM and unlocked the doors immediately to see if there is any rain. No rain and the skies looked ok. I got ready, had a glass of milk & woke up Jo. She gave me a farewell hug and I left the house at 5:24.
The initial 20 km was a breeze to ride. The route so far is familiar as I bicycle on it almost everyday.
After riding 25Â km, I took a short water break.
I barely rode for another 4 km and stopped again, this time to enjoy the view from top of a flyover. The rolling hills, green rice fields, railway track, chirping birds & fresh morning air provided perfect setting for a few pictures.
Soon I left the state highway & joined national highway 45 (and 16 too). This is a 4 lane highway with wide shoulder. Unlike in US (and many other western countries), in India bicycles, pedestrians and many other forms of moving objects are allowed on highways. The best part of riding on national highway is that the gradients are better. Next 15 km felt like one long flat ride.
I crossed Anakapalli (a small town on the outskirts of Vizag) and stopped for breakfast at 41 KM mark. 1/3rd distance completed!
After feasting on Idly, Dosa & a tea (traditional breakfast in south India), I resumed the journey at 8:10 AM.
Still no rains. So I rode on.
At around 50 KM mark, stopped for a quick drink of water & electral (oral re-hydration solution made with essential salts & minerals).
Around 60 km mark I started feeling a little thirsty and wanted to stop for some tea. Soon (after 6km) found a road side tea stall. My original plan is to ride until 80k mark and stop for lunch.
But seeing that I finished 66km by 9:56AM, I have decided to ride until Annavaram (my destination for the day) before lunch.
After the tea stop, I rode for another hour to reach Nakkapalli (a small village on the highway). There I saw a fruit juice stall. Immediately stopped to have a full glass of banana juice. The shop owner told me that Annavaram is another 36 km from there. It started drizzling now. I am a little worried that it may rain heavily.
But my fears were unfounded. Soon the skies cleared and I was on a climb. After riding just another 10 km, I had to stop again to quench my thirst and relax a bit. As I was sitting by the road side, a mini truck stopped next to me. the truck driver was curious to know where I am heading & my story. After chatting for a while they left me.
At 95KM mark, I stopped again for a quick snack (snickers bar). Soon 2 kids on a cycle approached me. They are Siva & Siva Ganesh. Siva Ganesh (eldest one, studying 9th class) wanted to test ride my cycle. He was curious to know how the gears work. He took the cycle for a short spin and returned. They spend another 5 minutes with me asking several questions.
Once again I found myself on a steady climb. And then there are strong head winds. My speeds dropped to the range of 10-15kmph. After a lot of pedaling & sweat, I crossed Tuni at 12:30PM.
Selfie @ 100km mark
It took me another 30 minutes & 6 km of biking to reach a small temple village called Lova Gudi. By now my water bottles are emptied. So I stopped here to purchase a bottle of water. From here Annavaram (my destination) is 15 km. Normally I would have finished this distance in 40-50 mins. But after riding for 6 hrs, I find myself tired & sweaty. Plus the winds have picked up again. And to top it, almost all of this stretch is a climb.
I took a deep breath and resumed cycling.
The wind & gradient made my task all the more difficult. But I pressed on.
See how harsh the wind is. The coconut leaves are all bent.
About 5 km away from Annavaram (around 110 km mark), someone in a car was waiting for me. As soon as he saw me, he waved his hands and stopped me. Turns out he is a biker from Vizag. He got curious upon seeing the site of a lone biker and wanted to know about me. We chatted for a while and exchanged phone numbers.
Finally at 2:50 PM, I reached Annavaram village gate. Yay!. It took me more than 9 hours & 30 minutes to reach here. Out of this riding time is 7:30 (it might have been slightly less than this as my tracking app – MapMyRide was not set to autopause for the first 65 km).
Finally, at Annavaram village gate after 9:30 hours of riding.
Day 1 – At Annavaram
I went to the first hotel I can find and ordered lunch. While waiting for lunch, I called Jo & my mom to tell that I reached safely.
After lunch I asked them if they have any rooms to stay. They have vacancies and I immediately took a room. I quickly showered and took a nap. But I could hardly sleep as my thighs and wrists were aching. It looked like I could not ride back and may have to take a bus to my home.
Originally I planned to visit the famous Annavaram temple in the evening. But my legs & back felt too sore to do anything. So instead I went for a short walk to explore the village in the evening.
Later I ordered dinner and watched some football on TV.
Around this time, I have decided to skip the return ride & take a bus instead. I told the same to Jo when I called her to say good night.
I kept waking up in the night due to one pain or other. I turned off the alarm at 6:15 AM and went back to sleep again.
Finally when I woke up at 8:00 I surprisingly felt rejuvenated and ready.
At that moment I decided to ride back home. My plan is to ride as far as I can and then take a bus.
Day 2 – Annavaram to Anakapalli (88 km, 4:30 hrs riding)
After a heavy breakfast & some coffee, I checked out of the hotel and started my return journey at 8:43 AM.
Since I have climbed & gained elevation yesterday, the first 40 km ride from Annavaram was almost downhill mixed with few flats. So I could maintain speeds between 20-30 kmph. At one point I even reached 43.5 kmph, although barely for a minute.
I did not stop anywhere for first 25 km. But then the views by the road are too breathtaking to ignore. So I stopped for a few pictures at 25k mark & again at 27k mark.
At the later stop, I found several open billed storks in the rice fields. It was a pleasure watching them forage for food & fly elegantly.
Pretty soon I reached the toll plaza. And yay!, no toll for me. Another reason to bike.
Had to stop again at 10:55AM to appreciate the beautiful green & blue views. Took a few pictures and resumed ride. Reached 50 KM by now.
At this point, I changed my plan to ride for 83 km. This will make the total distance as 200km.
By 11:30, I reached Elamanchali (a small village 20 km away from Anakapalli, my destination for the day). By now it started raining quite a bit. My bike accumulated quite a bit of dirt & soot.
By 1:00 PM, I reached outskirts of Anakapalli and spotted a nice road side restaurant. Immediate stopped there for lunch. As soon as I stopped it started raining heavily. So I had a leisurely lunch spending close to an hour there. Finally the skies cleared at 2 PM and I resumed my ride.
When I was 3 km outside Anakapalli, a gentleman on motorcycle slowed down and rode with me for a few minutes. He asked me several questions about where I am riding, what I do, why I am riding etc. He even invited me to have lunch with him. But I had to decline as I already finished my lunch.
Finally, at 3:06 PM, I finished 88km and stopped my bicycle ride.
An empty mini truck going towards Sabbavaram (half way between where I stopped & my home) offered me a ride.
From Sabbavaram I took an Auto (a 3 wheeled taxi, also called as tuk-tuk) to my home.
And that marked the end of my first ever 200 km bike ride.
My impressions:
Growing up, I used to be the least fit kid in my school. I sucked at all sorts of sports. I got kicked out of football, hockey, badminton, cricket and all other sporting teams in school.
So naturally I assumed that I am not good for athletic activities.
Once I completed my studies and got a job, I realized the importance of living an active life. So I started jogging, cycling and playing sports.
Ever since I quit my job to start my own business, I became even more fitness conscious. Every year (since 2010), I have challenged myself to break personal barriers. When I first considered biking, I could not imaging anything beyond 50km per day. But with practice and motivation, I could finish this ride.
Few thoughts:
- Do a few practice rides: I have been riding 20-30km per day for almost a month before taking up this challenge.
- We underestimate our body:Â We can take on big challenges, endure pain & perform at our peak so much more than we estimate.
- Drink & Eat well:Â I call my diet really healthy. We eat home cooked food 90% of the time. Most of our diet is veggies, fruits, milk, nuts, rice & wheat. Almost half of the vegetables & fruits we eat are grown in our back yard. We rarely drink and eat meat once a week.
- Enjoy the ride: Stop and enjoy the scenery. Talk to fellow travelers and take ample breaks. Any distance can be covered easily.
Thanks to
- Jo: for supporting & encouraging me.
- My mom: for not freaking out when she learned about the ride.
- Free Country & ADC: for the motivation
- You: for supporting Chandoo.org so that I can chase my passions.
Now for an Excel Dashboard visualizing the ride
Soon after I got back, I started thinking about analyzing all the ride data. I did what I do best. I created an Excel dashboard to tell the 200km ride story.
Here is a snap shot of the dashboard (click to expand).
Click here to download the Excel Workbook.
It is unlocked. So go ahead and examine the file. Break it apart to understand the logic & formulas. Learn something new & be awesome.
How is this dashboard made?
Here I am going provide only the highlights. Please visit Excel Dashboards page for fantastic tutorials & explanations on how to make dashboards.
- Tables: for structuring ride data. All the ride data came from MapMyRide. I used Doogal.co.uk to get elevation profile of the route.
- Column & line charts: for the splits, speed & elevation.
- Form controls: to make the charts dynamic & to control the Ride pics slideshow.
- Picture links: to show one of the many ride pictures thru scroll bar form control.
- Ample dose of formulas: Mainly INDEX, MATCH, SUMIFS & COUNTIFS.
More personal stories
If you are in the mood to know Chandoo.org & me a little more, check out these:
- Story of Chandoo.org startup
- Thank you, we have a home
- Thank you, we have a car (and another one too)
- Travelogues from my visits to Maldives & Australia
- Confessions of a dad
See you again with more awesome Excel stuff.
56 Responses to “Creating in-cell bar charts / histograms in excel”
Ay jhakkas!!!
Man, you're on a roll. A true-blue Excel innovator. What you're writing makes me think - why didn't anyone else think of this before?
Now that I've showered all the praises on you, it won't hurt to have a few comments on my blaag 😉
PS. I meant the innovator part.
@Amit ... thanks, I was also curious why this one was not explored, but again, I havent really searched a lot to ensure that I am posting the same ideas again. My intent is to make few people to benefit from this, if that happens I would be happy...
btw, posted a comment on your blaag... hope you are happy now 😀
Don't worry about repeating the ideas in the online world. As long as you are not copying it off anyone else and it is helpful for the readers, it's fine.
PS. the comment does not count.
The idea actually is not a new one :).
Check out MicroCharts
http://www.bonavistasystems.com/
to see how far you can get with font based in-cell charting
[...] can never get tired of in-cell charts, whenever I get sometime, I try to experiment something on them. Here is an idea to design true [...]
[...] Since we can insert any character in to a cell using formula, by installing a custom bar chart / pie font in our computer we can create incell graphs in excel with ease. Click here to see example pie chart, line chart. [...]
Where is the file? I can't seem to locate it. I want to donwload it. Thanks Chandoo!
Found it.
Great job, Chandoo. Love the site - and the fact that you provide downloads to help us (me) learn your secrets faster. I downloaded the font but can't figure out how to add it to my font library... Any hints? Thanks! Keep up the fantastic work.
@Mahqooi: Thank you and welcome to PHD 🙂
This is how you can install a font in a windows machine:
unzip the font files (if needed)
select and copy the font file to clip board by pressing ctrl+c
go to control panel > fonts
paste the file by pressing ctrl +v
repeat this procedure for other font files if any
if you are using mac, just right click on the font file and select install option.
let me know if you have some issues with this.
Hi Chandoo,
is there any mirrors for the bargraph font?
it seems that fontstruct.com is down for maintenance.
thanks!
@Cybsych: I am not sure if they have any mirrors. I will look in to my backup to see if a copy of the font can be located and ping you back. Thanks.
hi Chandoo, fontstruct is back online 😉
BTW, I am wondering about this in-cell chart.
How do I apply an automated conditional formatting to only a bar/point?
For example, the first image in this post, whereby RED = highest, BLUE=lowest.
Chandoo,
I guess this bars only work with positive numbers? so if you a list of costs per month, but one month you have negative cost meaning income due to let's say vendor credits. This incell bar could despict the month with a negative digit. or could it?
hi Chandoo, guess that you missed out my query 😀
is there a way to highlight the MAX and MIN bar based on the actual data (not the normalized)?
@Pedro, for that you need to have another set of characters (may be A-J for 0-9 and K-S for -1 to -9 and then use them to show the bars. It is a bit tricky, but achievable.
@Cybpsych: The highlighting was done manually (As you can see, there is probably no easy way to highlight / change colors of a portion of cell using Conditional formatting etc.). I am sorry, but you need to use someother sparkline technique to achieve this (or, write your own macro)
http://chandoo.org/wp/2008/09/05/microcharting-excel-howto/
thanks chandoo!
I love this simple and quick way of visualization results. I would like to learn more about normalizing values (i.e. the use of linear normalization). Can someone kindly point me in a good direction for this beginner? Much thanks to everyone (especially Chandoo) for the wealth of information provided. Long live the internet age!
@Jason: you can use simple excel formulas to normalize a set of values. If the list of values is in say a1: a10 and you want them to be normalized from 1 to 100, you can do that with a formula like: =A1/max($A$1:$A$10) * 100. Also, you can use the RANK formula to calculate the percentile of any value in the list.
[...] Bar | Sparklines | Pie charts | Bullet Graphs | w/ Conditional [...]
Nifty way to normalize the data....I'll have to take that into account when working with my charts.
One thing I'd like to add, you can eliminate the need for custom fonts with the bar charts by using a REPT function and using a small "g" set to the Webdings font. It's more likely anybody opening the file will have access to that font than the custom one you've provided. (More portability is a good thing 🙂 )
Portability is great.
I don't quite see how the REPT formula and the webding fonts can combine to solve the portability issue.
Mind you, i see that +REPT("g",1) will give you a bar, but we would need several bars of unequal lenght.
Can you elaborate?
Thank you
@Matt: I almost forgot about this comment. Thanks to Pedro for the bump.
As he points, portability is a good idea, but we will not be able to get bars of variable height using webdings font.
We can ofcourse use that along with text rotation and char(10) to create a pseudo incell bars. Here is a tutorial: http://chandoo.org/wp/2008/07/15/incell-bar-charts-revisited/
@Chandoo: Yep, that's exactly what I meant, use your text rotation and char(10) trick with REPT("G",) (then set the font to Webdings) to get your string of bars with variable height.
@Pedro: REPT("g",1) will give you one "g" (or in Webdings a bar of 1 height).
REPT("g",B2) will repeat for the value in B2... 🙂 Use that with Chandoo's take on linear normalizing, and yer all set.
Wingdings with an "n" character would be even more portable, but just doesn't look quite as cool...but pretty much everybody has that font, so it'd be portable.
You may have to adjust the font size in order to get all the bars to show correctly, perhaps some sizing of the row heights as well...
You can fake an incell line chart by using:
REPT(" ",B2-1)&REPT("n",B2)
where B2 is the value in the cell you want as a data point.
Wow, the formatting was horrid, let's elaborate a bit more...
REPT("",-1)&REPT("n",) - would give you a line graph, where could be a reference to each cell you'd like as a data point.
REPT just repeats a text string a number of times, it can be either a hard number (like Pedro's example), or a reference to a value in another cell (more handy). I believe Webdings is a common font in the MS Office suites I'm familiar with (2000 thru 2003), but I'm not sure of 2007's suite.
@Matt A: I am sorry for the formatting mishap. I am afraid of using too many plug ins, but I guess a simple HTML based comment box seems like a good idea now that lot more commenters are typing formulas and vba code in the comment box.
Coming to the formula.. thanks for sharing it. And yes, you are right, webdings is common to Office 2007 too. But even better solution would be to use good old pipe | symbol. When the font is Arial, the pipe character spacing looks optimum and subtle enough to look like an incell histogram / column chart.
After some searching through the character maps in Arial I noticed that there's a box symbol --> ? (created by holding ALT then typing 5595 on the numpad) that would work perfectly as another character to use for column charts. It looks just like the Webdings "g" character.
Is there a way to change the colour of the bars based upon the data. eg. 1-5 = red, 6-7 = amber, 8-10 = Green
@Ben... you can change the color of all bars in a cell using conditional formatting. But selectively changing color of bars inside cell is not possible unless you do it manually or through VBA.
[...] Creating in-cell bar charts / histograms in excel @ Pointy Haired Dilbert Filed under: Stuff [...]
Is this work only for the numbers or will it work for % data also. I tried to do the same for % data, but i didnt get. Pls let me know the formula for % data.
[...] trick is to use Incell Charts. [...]
Hello Chandoo,
I really like this, but I have Office for Mac 2011 and for the life of me I cannot figure out how to see the bargraph as an available font.
I have followed all the instructions for adding a font, but it does not appear. Do you have any suggestions?
Thanks
prb
Thanks. This one was cool and helpful. Can we experiment the same with "in cell" line graph as well? 🙂
Chandoo,
How do you "manually" change the color of the last bar in the series?
Lawrence
@Lawrence
Select the chart
Select the series
Select the last point/column of the series
Ctrl 1 or right click Format Point
Select a color
Hui,
Thanks!
I should have been more descriptive. What I meant to ask was about the in-cell bar graph created with the REPT function described above. How do I get the last REPT (the last bar) to be a different color than the rest?
Lawrence
@Lawrence
You cannot change colors in a cell using formula
You can use either VBA code or do it manually
Select the cell
Copy and paste it as values
Edit the cell F2
using the arrows move to the character you want to color
Shift and select the cell by arrow keying over it
with the characyer selected
Ctrl 1 (Format Cells)
Change the Font Color to suit
It won't be a color change per se...but you can set an IF statement in your REPT formulas for different characters to show as the bars. The characters "c" and "g" in Webdings are both boxes, one is a solid block, the other an outline.
For example, say I wanted to highlight the highest bar in my REPT formulas...my formula to translate the numeric cells A2:A15 to characters would be:
IF(A7=MAX($A$2:$A15),REPT("c",B7),REPT("g",B7))
so if the cell I'm checking (here it happened to be A7), is the highest number...its bar would display differently further along down in the concatenations...
@Hui...THANKS!
@ Matt A... Very cool idea. What formatting do you recommend for the cell? The Webdings "c" hollow box is very faded and hard to read even if bolded and bigger font size is used. If I could just punch it up a bit it would be perfect with 5 "c" columns followed by a single solid "g" column...as in showing the trend in the trailing 6 months of data.
Lawrence
@ Lawrence
Good question...lately I've been using ? (which you get from holding ALT then typing 5595 on the numeric keypad) for most of my bars. Unfortunately the character map doesn't lead me to a differently "shaded" box of the same size. Reason I use this nowadays...it's part of arial font...just a special char map character I can rapidly input w/o any formatting nonsense.
I'll check to see if I can replicate another box of same size that may have different shading using the same method...no luck as of yet.
I've just built the in cell bargraph and was trying to create a pop up window which would display the Monthly Sales for Last 12 months when they click on any of the bargraph cells
[...] Reference:Â http://chandoo.org/wp/2008/05/13/creating-in-cell-bar-charts-histograms-in-excel/ Like this:LikeBe the first to like this. [...]
[...] To quickly insert an in cell micro-chart, use REPT() function… Get Full Tip [...]
Hi, there is a problem with the Bargraph font. On my win7 machine it works perfectly but when I try to install it on my boss's mac it returns an error called " 'Name' Table Structure"
I tried to install on two different macs and the same error resulted. As a result the font does not show up as an option in any program.
Â
Just an FYI. I don't use macs but I know some people do.
Whats up! I just wish to give a huge thumbs up for the good info you might have right here on this post. I can be coming back to your weblog for extra soon.
[...] like .docx, .htaccess etc.) 43. To quickly insert an in cell micro-chart, use REPT() function… Get Full Tip 44. COUNT() only counts number of cells with numbers in them, if you want to count number of cells [...]
Thanks Chandoo for the font!! It works great once installed on my machine, but is there any way (besides printing and scanning the doc) that I can get the graphs to show up on other peoples' machines without going through the font install process? My file has to be sent out to clients that don't have that font installed.
Sarah, Excel doesn't allow embedding of fonts (aside from a workaround using a macro). The font will need to be sent to all who want to view the file. I went through the same question with my boss. I ultimately just installed the font on her computer.
If the data is only to be viewed, and not modified, moved, etc. you can save the file as a pdf. The font can be viewed that way.
Hello every one there is a problem I need auto update summary formula from other sheets data pick please give me sample file and also auto up grate summary sheet format.................
@Joesali
I'd suggest asking this type of question at the Chandoo.org Forums
I'd suggest uploading a sample file also
Hi chandu,
Apart from excel, i need the formula to find bar graph height dynamically when using with log scale, for example for linear graph i would take the maximum value to height of the panel as
(value divided by maxvalue) * height.
Now , i am using a logarithimic graph can you tell me the right formula which fits perfectly.
Thanks in advance
Nice info... Thanks... very hepfull... 🙂
The font does not seem to be available at fontshop. Is there somewhere else to download the bargraph font?
@Amber
Try doing a Google search for Bargraph Font
it returns several possibilities
Is there a way to do this without using bar graph font? We have a financial report to be published to stakeholders and they will not have this font installed, so probably will not be able to view the bar chart as well.