Solved

Vertical DataBar function in Excel 2003

Posted on 2012-03-09
2
749 Views
Last Modified: 2012-03-09
I use Excel 2003.

I have the following function

Public Function DataBar(lngValue As Long)

DataBar = String(lngValue, ChrW(9608))

End Function

Which I use with the following formula

=IF(S5<0,S5&" "&IF(S5/100<0,DataBar(ABS(S5/100)*0.5),""),"")

to create horizontal Data Bars

Is there anyway to create vertical data bars?
0
Comment
Question by:fitaliano
  • 2
2 Comments
 
LVL 41

Expert Comment

by:dlmille
ID: 37703828
Sure, you just rotate the text alignment of your data bar text by 90 degrees and shift your data to go across a row instead of down a column (if you want it to look like a column chart.

See attached, using my databar function from http://www.mschaef.com/blog/tech/excel/databar.txt

There's nothing wrong with yours, just using mine.  The operation is the same, change orientation of font, then shift your data cells from top down, to left to right.

See attached.

Dave
data-bars-41.xls
0
 
LVL 41

Accepted Solution

by:
dlmille earned 500 total points
ID: 37703836
And here it is using your databar function as well (I used a different formula as the goal here is how to make it all appear vertical and I didn't relate to what data you were using against your databar as you only provided a formula with no sample data - no sample spreadsheet!!)

That's ok - but it helps us help you when you Do do that ;)

Again, its just rotating the text and shifting the data from top down to left to right.

Cheers,

Dave
data-bars-r2.xls
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now