#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 58
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 19
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"