Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Relative cell ranges
Hi
In the "Range("A5:E5").Select" statement I need to make the A5:E5 part of it change as to whatever the active cell is at the time. I have no idea as to what it will be before hand. Can anyone help me? Erle |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Relative cell ranges
Activecell.Resize(,5).Select
-- HTH RP (remove nothere from the email address if mailing direct) "edm" wrote in message ups.com... Hi In the "Range("A5:E5").Select" statement I need to make the A5:E5 part of it change as to whatever the active cell is at the time. I have no idea as to what it will be before hand. Can anyone help me? Erle |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Relative cell ranges
This might help, please tell me if it does or if it doesn't:
.... Dim r as Range Dim s as String s=ActiveCell.Value For Each r in Range("A5:E5") r.Value=s Next r .... That should set the active cell value to the range "A5:E5" "edm" wrote: Hi In the "Range("A5:E5").Select" statement I need to make the A5:E5 part of it change as to whatever the active cell is at the time. I have no idea as to what it will be before hand. Can anyone help me? Erle |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Relative cell ranges
Hi,
These do different things, depends on what you really wnt to do. Sub Macro1() ActiveCell.Range("A1:E1").Select End Sub (Selects from activecell right to include five cells) Sub Macro2() Selection.CurrentRegion.Select End Sub (Selects the active "Region") Thanks, "edm" wrote: Hi In the "Range("A5:E5").Select" statement I need to make the A5:E5 part of it change as to whatever the active cell is at the time. I have no idea as to what it will be before hand. Can anyone help me? Erle |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Relative cell ranges
Thanks for your answer(s). I think I didn't make clear that the A5:E5
needs to change, it could be A23:E23 or A234:E234 or even L512:P512. Thanks again Erle |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Relative cell ranges
did u c my reply?
-- HTH RP (remove nothere from the email address if mailing direct) "edm" wrote in message oups.com... Thanks for your answer(s). I think I didn't make clear that the A5:E5 needs to change, it could be A23:E23 or A234:E234 or even L512:P512. Thanks again Erle |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
a twist to relative ranges | Excel Discussion (Misc queries) | |||
Relative Ranges in excel macro | Excel Discussion (Misc queries) | |||
Relative Ranges in excel macro | Excel Worksheet Functions | |||
using relative named ranges directly in functions | Excel Programming | |||
Specifying ranges relative to a cell | Excel Programming |