Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
If I use For i = 3 To iNumOfRows + 1 Sheet1.Cells(i, 6).Formula = Sheet1.Cells(2, 6).Formula Next It copies the formula for row 2: "=SEARCH("_",C2,1)" to all of these cell. Specifically I've got the following results: Sheet1.Cells(3, 6).Formula = "=SEARCH("_",C2,1)" Sheet1.Cells(4, 6).Formula = "=SEARCH("_",C2,1)" Sheet1.Cells(5, 6).Formula = "=SEARCH("_",C2,1)" Sheet1.Cells(6, 6).Formula = "=SEARCH("_",C2,1)" .... That's NOT what I want. I want the row number in the formula the same as the current cell. Specifically, I want to get the following results: Sheet1.Cells(3, 6).Formula = "=SEARCH("_",C3,1)" Sheet1.Cells(4, 6).Formula = "=SEARCH("_",C4,1)" Sheet1.Cells(5, 6).Formula = "=SEARCH("_",C5,1)" Sheet1.Cells(6, 6).Formula = "=SEARCH("_",C6,1)" .... Any advice on how to do this? Thanks! -Emily |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula Problem in Macro | Excel Discussion (Misc queries) | |||
Put a formula to a cell with macro and it doesent calculate. (Excel localisation problem?) | Excel Programming | |||
Problem in updating all worksheets of a workbook using a macro that calls another macro | Excel Programming | |||
Macro Formula Updating Problem | Excel Programming | |||
Excel/macro Formula Problem! | Excel Programming |