ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   setting row in macro (https://www.excelbanter.com/excel-programming/285728-setting-row-macro.html)

pabs

setting row in macro
 
here's what my problem is...

when I use this function in my macro I would like to modify the value
that is set to -R[-10]


"=INDEX([Master.xls]defenition!R6C1:R80C5,
MATCH([Master.xls]Master!R[-10]C[28],[Master.xls]defenition!R6C1:R80C1,),
MATCH(R12C4,[Master.xls]defenition!R6C1:R6C5,))"


I need to make it dynamic.... I change the range everytime it goes in
my FOR loop. I tried doing this R[-(10 + counter)] but it didn't like
that very much :)
what is the syntax that I need to use in order to be able to add on
every pass of the for loop???



thanks

PAbs


---
Message posted from http://www.ExcelForum.com/


Colo[_42_]

setting row in macro
 
Hi pabs, if you would like to a variable in the formula written in VBA
the variable part shoud be divided by a double quote and ampersand a
follows.


Code
-------------------


"=INDEX([Master.xls]defenition!R6C1:R80C5, MATCH([Master.xls]Master!R[" & -1 * (10 + counter) & "]C[28],[Master.xls]defenition!R6C1:R80C1,), MATCH(R12C4,[Master.xls]defenition!R6C1:R6C5,))"


-------------------


--
Message posted from http://www.ExcelForum.com


pabs[_2_]

setting row in macro
 
ahh,...that's what I was missing! thanks

Pabs


---
Message posted from http://www.ExcelForum.com/



All times are GMT +1. The time now is 05:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com