Combine the label sections in a single cell in the worksheet. For example,
in cell D11, enter a formula like this:
=TEXT(D7,"<number format>")&" "&D9
assuming D7 has the value and D9 has the units.
Then add labels to the chart, using any of the built in options. Select a
single label (two single clicks are needed: the first to select the series
of labels, the second to select one label), then type = in the formula bar
and click on the cell, so the formula bar reads
=Sheet1!$D$11
and press Enter. To do a bunch of labels in one shot, download one of the
following utilities:
Rob Bovey's Chart Labeler,
http://appspro.com
John Walkenbach's Chart Tools,
http://j-walk.com
I don't know quite what this is doing, between the '+' and the nested Format
statements:
Format(Sheet1.Range("D7").Value, "0,000" + Format(Sheet1.Range("D9").Value,
""))
Use an ampersand (&) to concatenate text, because under some conditions, VBA
will coerce the text bits into numbers and actually perform an addition
instead of a concatenation.
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. -
http://PeltierTech.com
_______
<(E-Mail Removed)> wrote in message
news:f9e7edb2-71d9-4560-99aa-(E-Mail Removed)...
>I have 2 rows of information. 1) volume (1,000,000) 2) unit of measure
> (lb). I would like to have it where on the data value on the chart it
> would say 1,000,000lbs combined together. I have label code where this
> works. I also would like it where if I change cell value D5 (where
> the information is) it would change the value of the data value ( i
> have this part just not the combining of text part).
>
> Private Sub Label1_Change()
> Range("d5").Select
> Me.Label1.Caption = Format(Sheet1.Range("D7").Value, "0,000" +
> Format(Sheet1.Range("D9").Value, ""))
>
> End Sub
>
> But i don't have any labels anymore, i imagine the code would be
> similar to this. Any help anyone.
>
> Ryan