Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Vee,
In your sub "Worksheet_Change(ByVal Target As Range)", there is a parameter named 'Target', which has a 'Column' property as well as a 'Row' property. So when you select a cell you can get the row number as well as the column number of the selected cell. If the current selected cell is "H2", then "Target.Row=2 " and "Target.Column=8". If you want the email address in that row, then "Target.Column-2" would give you column 6 or "F". If "H2" is selected then: Cells(Target.Row,Target.Column-2) means cells(2,6) or "F2" Note that the 'Target' object is only valid in the sub where it is declared, in this case "Worksheet_Change(ByVal Target As Range)" Hope this helps.. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Mailing an excel range in the body of an e-mail | Excel Discussion (Misc queries) | |||
Why do some Excel cells refer to e-mail? | Excel Worksheet Functions | |||
how to compute a range of cells based on another range of cells? | Excel Worksheet Functions | |||
how to compute a range of cells based on another range of cells? | Excel Worksheet Functions | |||
Mail a different files to each person in a range | Excel Worksheet Functions |