Display range of numbers as horizontal lines

Joshalev

New Member
Joined
Jun 22, 2017
Messages
7
Hi,
I have a list of children names in A1:A20, and their heights in B1:B20 - 0.8, 1.24, 1.3, 1.47, 1.56 etc..
I would like to create a chart (or other visual option) that will draw horizontal lines on Y axes to represent the heights proportionally:


1.56------------------

1.47------------------


1.3-------------------
1.24------------------


0.8-------------------


How would you approach this? Preferably with vba.
Thanks!
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
What about using simple data bars (located in Conditional Formatting)

B1EO3e2.png
 
Upvote 0
What about using simple data bars (located in Conditional Formatting)

B1EO3e2.png

Hi Geek, Thanks for the fast reply!
It doesn't exactly fit my need. I need to see the lines horizontal and on the Y axes.
I could use your idea and turn it 90 degrees counterclockwise and then somehow delete the bar itself and leave just the top line.. but that would be cumbersome and I would like the lines to be same length, to the full X axis.
I would love to hear more ideas :-)
Thanks!
 
Upvote 0
Do you mean something like the below? What is the purpose of showing an horizontal line for each data point? As you see, doing so makes it a bit too crowded. Maybe you want to show a line that highlights an average?




ti2REUQ.png



z58rzT2.png



or divide them into some sort of height bins:

4drNNVy.png
 
Upvote 0
Mr Geek, awesome!!!
I need just the first example, with the horizontal lines. It's exactly what I need!
how did you do it?!
Thanks!
 
Upvote 0
You need to select your data and add a line chart with markers. Then you hide the line and emphasize a bit the markers to the format you want. Then you need to add a new series (XY scatter) where the X values are all 0's and the Y values are the heights of the children. You move to the 2nd horizontal axis (minimum 0 - maximum 1) then for this series you add positive horizontal error bars with a fixed value of 1. Then you can adjust the formatting and add labels etc
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top