I have a number of functions that are comparing based on a character selected in a worksheet. The code looks like:
funct = "=(IF( R[1]C[-24] = ""R"" ,(R[1]C[-22] - R[1]C[-23]), )
Range("AB" & newrow).Select
ActiveCell.value = funct
Then another one like:
funct = "=(IF( R[1]C[-24] = ""F"" ,(R[1]C[-22] - R[1]C[-23]), )
...
I want to put these in an loop using an array (I assume it should be a string array):
Dim Array(5) as string
Array(0) = "R" (or maybe """R""" ??)
Array(1) = "F"
for I = 0 to max
funct = "=(IF( R[1]C[-24] = Array(I),(R[1]C[-22] - R[1]C[-23]), )
next I
I've tried lots of different syntax for this & nothing works yet. It seems that the array isn't evaluating in the function to its string value....
Any ideas??
Thanks,
Ray
funct = "=(IF( R[1]C[-24] = ""R"" ,(R[1]C[-22] - R[1]C[-23]), )
Range("AB" & newrow).Select
ActiveCell.value = funct
Then another one like:
funct = "=(IF( R[1]C[-24] = ""F"" ,(R[1]C[-22] - R[1]C[-23]), )
...
I want to put these in an loop using an array (I assume it should be a string array):
Dim Array(5) as string
Array(0) = "R" (or maybe """R""" ??)
Array(1) = "F"
for I = 0 to max
funct = "=(IF( R[1]C[-24] = Array(I),(R[1]C[-22] - R[1]C[-23]), )
next I
I've tried lots of different syntax for this & nothing works yet. It seems that the array isn't evaluating in the function to its string value....
Any ideas??
Thanks,
Ray