Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selection based on values in a cell
Cell A1 contains an integer value
Cell B1 contains a (larger) integer value The cursor is placed at cell C1 Can anyone tell me what the code would be to select a range in row 1 which starts at the column value in A1 and ends at the column value in B1 and then returns the cursor to C1? Help would be much appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selection based on values in a cell
Sub Tester1()
Range(Rows(Range("A1")), Rows(Range("B1"))).Select Selection.Interior.ColorIndex = 4 Range("C1").Select End Sub Not sure what the point of selecting the rows if if you then move the selection back to C1. To maintain the selection and still have the cursor in C1, both Sub Tester2() Union(Range(Rows(Range("A1")), _ Rows(Range("B1"))), Range("C1")).Select Range("C1").Activate End Sub -- Regards, Tom Ogilvy "Stewart" wrote in message ... Cell A1 contains an integer value Cell B1 contains a (larger) integer value The cursor is placed at cell C1 Can anyone tell me what the code would be to select a range in row 1 which starts at the column value in A1 and ends at the column value in B1 and then returns the cursor to C1? Help would be much appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Creating values based on selection from drop down box | Excel Discussion (Misc queries) | |||
Formatting cell based upon values w/in a selection | New Users to Excel | |||
Calculating values based on selection from a drop-down list in Exc | Excel Worksheet Functions | |||
List box change values based on selection | Excel Discussion (Misc queries) | |||
Excel - Sum of Values based on adjacent list selection | New Users to Excel |