how to display stat. significance (*) in the chart

Yishih

New Member
Joined
Oct 16, 2002
Messages
2
Is there a way to automatically display asterisk(s) in a bar chart (similar to displaying data labels) without adding a text box of "*" to the chart?
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Damon Ostrander

MrExcel MVP
Joined
Feb 17, 2002
Messages
4,239
Hi Yishih,

What do you mean by "automatically?" Yes, you can assign the label to a bar in VBA, if that is what you are asking. For example, the code

With activesheet.ChartObjects(1).Chart.SeriesCollection(1).points(4)
.hasdatalabel = true
.datalabel.text = "*"
End With

will turn on the datalabel for point 4 in series 1 of chart object 1 on the active worksheet, and set it to "*".

I hope this helps.

Damon
 

Yishih

New Member
Joined
Oct 16, 2002
Messages
2
Thanks, Damon, for responding to my question. Suppose I have two sets of values:

Group1Rte Group2Rte PValue
10% 50% .001
30% 32% .85
70% 90% .04

After making a bar chart of the two sets, I'd like to display an "*" on any of the three Group2's bars if the p values are less than .05. In the above example, "*" will be displaed on top of two of the three bars (groups).

I'd like to make this happen automatically in an Excel workbook with multipe worksheets - each has a similar layout. I use SAS macros and DDE to output data to Excel in iterations.

Yishih
 

Forum statistics

Threads
1,144,510
Messages
5,724,781
Members
422,578
Latest member
annsalinas

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
Top