Thread
:
offset question
View Single Post
#
7
Posted to microsoft.public.excel.programming
[email protected]
external usenet poster
Posts: 2
offset question
Thanks my code now works correctly
wrote:
Hi Ram,
In your Offset formula you need to substitute the occurances of X that
relate to your X variable with
" & X & "
because you do not want the character X to appear, but it's value, eg
jan = "=SumProduct(--(Sheet4!A1:A30000=" & _
"OFFSET('processed Amount'!A1,0," & X & ",1,1)),--(Sheet4!AL1:AL30000
0))"
if it still doesn't work, try
" & cstr(X) & "
As for concatenating the value of X to the number 2, why? I don't think
it will work.
the Range command needs to be populated with a string, eg
Range("A5").value
I recommend using
Cells(2,X+1) = v
I was mistaken earlier when I said: Range(2,X+1) = v
Reply With Quote
[email protected]
View Public Profile
Find all posts by
[email protected]