Positionin charts
Navin,
Assuming that the only shapes that you have on the activesheet are the 15 charts, try the macro
below. See the in-line comments for use of the variables.
HTH,
Bernie
MS Excel MVP
Sub SpaceOutCharts()
Dim i As Integer
Dim j As Integer
Dim NumRow As Integer
Dim NumCol As Integer
Dim FirstRow As Integer
Dim FirstCol As Integer
Dim RowInc As Integer
Dim ColInc As Integer
'Specify 5 rows by 3 columns of charts
NumRow = 5
NumCol = 3
'Specify the cell for the first chart - C6 in this example
FirstRow = 6
FirstCol = 3
'Specify the spacing of the charts - these depend on your
'chart size and column width and row height - trial and error....
RowInc = 10
ColInc = 5
For i = 0 To NumRow - 1
For j = 0 To NumCol - 1
With ActiveSheet.Shapes(j * NumRow + i + 1)
.Left = Cells(i * RowInc + FirstRow, j * ColInc + FirstCol).Left
.Top = Cells(i * RowInc + FirstRow, j * ColInc + FirstCol).Top
End With
Next j
Next i
End Sub
"navin" wrote in message
oups.com...
Hi All,
I have 15 charts in a sheet. I want to place these charts in a way
that the sheet contains, 3 charts in a row (i.e) total five columns.
any ideas how to achieve this.
thanks,
navin
|