Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default Location of Cell Between Embedded Chart

I have a chart embedded on a worksheet. I would like to select the cell
just below the chart. Is there a way of finding that location?

Thanks,

Bill


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Location of Cell Between Embedded Chart

Bill,

AFAIK, there is no easy lookup - you have to work it out:

1. Determine the position of the chart and its height on the sheet:

Dim baseline as Double
With ActiveSheet.ChartObjects("Chart 1")
baseline = .Top + .Height
End With

2. Add together the heights of all the rows until the sum is greater than
the baseline above:

Dim aRow As Long
Dim cumRowHt As Double

Do
aRow = aRow + 1
cumRowHt = cumRowHt + Rows(aRow).RowHeight
Loop Until cumRowHt baseline
Cells(aRow + 1, 2) = "Put text Here"


You can do something similar with the left & width properties to determine
which column.

HTH

Tim



"Bill" wrote in message
ink.net...
I have a chart embedded on a worksheet. I would like to select the cell
just below the chart. Is there a way of finding that location?

Thanks,

Bill




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Location of Cell Between Embedded Chart

Tim & Bill

I didn't see the OP but simply

Dim rng As Range
With ActiveSheet.ChartObjects(1)
Set rng = ActiveSheet.Cells(.BottomRightCell.Row + 1, _
.TopLeftCell.Column)
End With

rng.Select

Regards,
Peter T


"Tim Barlow" wrote in message
...
Bill,

AFAIK, there is no easy lookup - you have to work it out:

1. Determine the position of the chart and its height on the sheet:

Dim baseline as Double
With ActiveSheet.ChartObjects("Chart 1")
baseline = .Top + .Height
End With

2. Add together the heights of all the rows until the sum is greater than
the baseline above:

Dim aRow As Long
Dim cumRowHt As Double

Do
aRow = aRow + 1
cumRowHt = cumRowHt + Rows(aRow).RowHeight
Loop Until cumRowHt baseline
Cells(aRow + 1, 2) = "Put text Here"


You can do something similar with the left & width properties to determine
which column.

HTH

Tim



"Bill" wrote in message
ink.net...
I have a chart embedded on a worksheet. I would like to select the cell
just below the chart. Is there a way of finding that location?

Thanks,

Bill






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Location of Cell Between Embedded Chart

Peter,

That's much neater & quicker.

Tim


"Peter T" <peter_t@discussions wrote in message
...
Tim & Bill

I didn't see the OP but simply

Dim rng As Range
With ActiveSheet.ChartObjects(1)
Set rng = ActiveSheet.Cells(.BottomRightCell.Row + 1, _
.TopLeftCell.Column)
End With

rng.Select

Regards,
Peter T


"Tim Barlow" wrote in message
...
Bill,

AFAIK, there is no easy lookup - you have to work it out:

1. Determine the position of the chart and its height on the sheet:

Dim baseline as Double
With ActiveSheet.ChartObjects("Chart 1")
baseline = .Top + .Height
End With

2. Add together the heights of all the rows until the sum is greater

than
the baseline above:

Dim aRow As Long
Dim cumRowHt As Double

Do
aRow = aRow + 1
cumRowHt = cumRowHt + Rows(aRow).RowHeight
Loop Until cumRowHt baseline
Cells(aRow + 1, 2) = "Put text Here"


You can do something similar with the left & width properties to

determine
which column.

HTH

Tim



"Bill" wrote in message
ink.net...
I have a chart embedded on a worksheet. I would like to select the

cell
just below the chart. Is there a way of finding that location?

Thanks,

Bill








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Embedded Chart Versus Chart - ShowDetail Issue [email protected] Charts and Charting in Excel 1 May 14th 06 04:11 PM
enabling chart events for an embedded chart Wazooli Excel Programming 2 January 26th 06 01:15 PM
what is the difference between embedded chart and chart-in-a-sheet dhruv Excel Programming 1 January 18th 06 03:35 PM
Non embedded chart location Jonathan Davis Excel Programming 3 May 25th 05 02:49 AM
Size and location of an embedded chart Raul[_4_] Excel Programming 2 July 3rd 04 06:04 PM


All times are GMT +1. The time now is 01:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"