View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Yeshwin[_2_] Yeshwin[_2_] is offline
external usenet poster
 
Posts: 4
Default Urgent Macro help

Hi All,

Please Need help.

I have a function below that needs to be twicked so that i can use it.

I am trying to apply the second row valuse to the datalables. Can some one
please give me a simpler version of this function so that I can impliment it
and understand as to what is happening so that i can learn from it.

Sub customdatalabels(ActiveChart, columns, measures)
Dim r
Dim c
Dim val
Set rval = False
For r = 1 To r <= measures

For c = 1 To c <= columns
val = Activesheet.Range(col(c) + (r + 1)).Value
If (val < undefined & val < "") Then
rval = True
If (ActiveChart.PlotBy = 2) Then

ActiveChart.SeriesCollection.Item(c).Points.Item(r ).DataLabel.Text = val
Else

ActiveChart.SeriesCollection.Item(r).Points.Item(c ).DataLabel.Text = val
Datasheet.Rows.Item(r + 2).Delete
rval

End Sub

What I understan is that I am looping through the columns and rows and then
going to the send row and getting the valuse for each column and then
appling that to the datalable.


Now I also see that there is reference to col which seems to be an external
function that reads the column names like A, B, C etc...


I was wondering if some one cna give an work around this so that I do not
have to use that external function col and still reference the columns in a
way that i can use them in the function above.


Any and All help will be very much appreciated.

Thanks a bunch folks for being there

Yesh