Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Row_Calculation
I have a for a formula in a macro:
ActiveCell.FormulaR1C1 = _ "=MID(R[-11]C,FIND("","",R[-11]C,1)+2,10) & "" "" & MID(R[-11]C,FIND(""D_"",R[-11]C,1)+2,FIND("","",R[-11]C,1)-FIND(""D_"",R[-11]C,1)-2)" I need to replace the "-11" with a variable name that I calculate prior to this. Can I do this? If so, I need your help. I still trying to understand macros. thanks for looking. El Bee. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Row_Calculation
You could do this:
Var = -11 ActiveCell.FormulaR1C1 = _ "=MID(R[-" & Var & "]C,FIND("","",R[-" & Var & "]C,1)+2,10) & "" "" & MID(R[-" & Var & "]C,FIND(""D_"",R[-" & Var & "]C,1)+2,FIND("","",R[-" & Var & "]C,1)-FIND(""D_"",R[-" & Var & "]C,1)-2)" -- Adilson Soledade "El Bee" wrote: I have a for a formula in a macro: ActiveCell.FormulaR1C1 = _ "=MID(R[-11]C,FIND("","",R[-11]C,1)+2,10) & "" "" & MID(R[-11]C,FIND(""D_"",R[-11]C,1)+2,FIND("","",R[-11]C,1)-FIND(""D_"",R[-11]C,1)-2)" I need to replace the "-11" with a variable name that I calculate prior to this. Can I do this? If so, I need your help. I still trying to understand macros. thanks for looking. El Bee. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|