Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using a worksheet selectionchange event and want to enter some values in
adjacent cells based on the entry in the selected cells. I know what I want to enter, but need to know the code to select the offset cells. The selected cells are in column 1. What would I need to change below to get this to be more elegant? I have this: Range("B2").Select ActiveCell.FormulaR1C1 = _ "=VLOOKUP(RC1,DBExtract,MATCH(R1C,DBExtract!R[-1],0),FALSE)" Range("C2").Select ActiveCell.FormulaR1C1 = _ "=VLOOKUP(RC1,DBExtract,MATCH(R1C,DBExtract!R[-1],0),FALSE)" Range("D2").Select ActiveCell.FormulaR1C1 = _ "=VLOOKUP(RC1,DBExtract,MATCH(R1C,DBExtract!R[-1],0),FALSE)" Range("E2").Select ActiveCell.FormulaR1C1 = _ "=VLOOKUP(RC1,DBExtract,MATCH(R1C,DBExtract!R[-1],0),FALSE)" Thanks, Barb Reinhardt |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Range question | Excel Worksheet Functions | |||
Range Question | Excel Discussion (Misc queries) | |||
Range Question / error 1004: method Range of object Worksheet has failed | Excel Programming | |||
Range question | Excel Programming | |||
Range.Formula and Range question using Excel Automation | Excel Programming |