Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find x-y coordinates of cell?
How can I find the x-y coordinates of the upper-left corner of a cell?
I want to insert two overlapping rectangles (msoShapeRectangle) of different colors into the cell to illustrate the percentage value displayed in an adjacent cell. Row heights an column widths on the sheet are not predictable. Thanks, Wes |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find x-y coordinates of cell?
Sub whereAmI()
MsgBox (ActiveCell.Top & Chr(10) & ActiveCell.Left) End Sub Note that if you select A1 you get 0,0 So it is relative to the top of the shorksheet, not the top of the application. -- Gary''s Student - gsnu2007i "Sun Tzu" wrote: How can I find the x-y coordinates of the upper-left corner of a cell? I want to insert two overlapping rectangles (msoShapeRectangle) of different colors into the cell to illustrate the percentage value displayed in an adjacent cell. Row heights an column widths on the sheet are not predictable. Thanks, Wes |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find x-y coordinates of cell?
Sub test()
Dim rng As Range Dim shp As Shape Set rng = Range("B2:D3") With rng Set shp = ActiveSheet.Shapes.AddShape( _ msoShapeRectangle, _ .Left, .Top, .Width, .Height) End With shp.Fill.ForeColor.SchemeColor = 7 + 6 End Sub Regards, Peter T "Sun Tzu" wrote in message ... How can I find the x-y coordinates of the upper-left corner of a cell? I want to insert two overlapping rectangles (msoShapeRectangle) of different colors into the cell to illustrate the percentage value displayed in an adjacent cell. Row heights an column widths on the sheet are not predictable. Thanks, Wes |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find x-y coordinates of cell?
On May 30, 11:47*am, "Peter T" <peter_t@discussions wrote:
Sub test() Dim rng As Range Dim shp As Shape Set rng = Range("B2:D3") With rng * * Set shp = ActiveSheet.Shapes.AddShape( _ * * * * * * * * msoShapeRectangle, _ * * * * * * * * .Left, .Top, .Width, .Height) End With shp.Fill.ForeColor.SchemeColor = 7 + 6 End Sub Regards, Peter T "Sun Tzu" wrote in message ... How can I find the x-y coordinates of the upper-left corner of a cell? I want to insert two overlapping rectangles (msoShapeRectangle) of different colors into the cell to illustrate the percentage value displayed in an adjacent cell. *Row heights an column widths on the sheet are not predictable. Thanks, Wes- Hide quoted text - - Show quoted text - Thank you! |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find x-y coordinates of cell?
On May 30, 11:46*am, Gary''s Student
wrote: Sub whereAmI() MsgBox (ActiveCell.Top & Chr(10) & ActiveCell.Left) End Sub Note that if you select A1 you get 0,0 So it is relative to the top of the shorksheet, not the top of the application. -- Gary''s Student - gsnu2007i "Sun Tzu" wrote: How can I find the x-y coordinates of the upper-left corner of a cell? I want to insert two overlapping rectangles (msoShapeRectangle) of different colors into the cell to illustrate the percentage value displayed in an adjacent cell. *Row heights an column widths on the sheet are not predictable. Thanks, Wes- Hide quoted text - - Show quoted text - Thank you! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
find corresponding coordinates on graph | Charts and Charting in Excel | |||
how to find coordinates in excel graph | Charts and Charting in Excel | |||
Find specific text and return coordinates | Excel Programming | |||
Simple way to convert UTM ED50 coordinates to decimal coordinates? | Excel Programming | |||
How to find the cell given x and y worksheet coordinates | Excel Programming |