• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 848
  • Last Modified:

Vertical DataBar function in Excel 2003

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
fitaliano
Asked:
fitaliano
  • 2
1 Solution
 
dlmilleCommented:
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
 
dlmilleCommented:
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now