Y
yaniv.dg
hi all,
does anyone know how to save data coming form formulaarray directly to
a variable?
does anyone know how to save data coming form formulaarray directly to
a variable?
hi dave
this is the formula:
"=INDEX('[somefile.xls]" & WsName &
"'!R2C6:R10000C6,MATCH(1,(VALUE(RC[-10])='[somefile.xls]" & WsName &
"'!R2C1:R10000C1)*("" & gradegroup & ""='[Job somefile.xls]" & WsName &
"'!R2C4:R10000C4),0))"
im putting it inside of arrayformula function
by the way do you know how can i add to the formula in vba this sign ""
with a variable
i mean for example:
you have this formula vlooup("fish",.......)
so if i have the fish in a variable i want to have it in the formula
vlookup(" & myvariable &"
so how can i do it,it works only when there is no need for
"")inverted commas )
Dave Peterson כתב:How about you getting your formula to work in the worksheet? Then copy|paste
that working formula into your reply. It'll be easier to modify that than to
start from scratch.
hi bob,
i dont know why but when i'm using this formula on the excel manualy
its ok but when i'm using it via vba its not working:
xlApp.Range("S" & row).FormulaArray = "=INDEX(xlFile &
"'!R2C6:R10000C6,MATCH(1,and((R[-1]C[1]<=RIGHT(xlFile &
"'!R2C4:R10000C4,3)),(R[-1]C[1]>=LEFT(xlFile &
"'!R2C4:R10000C4,3))),0))"
its raising the error 1004:"unable to set formulaArray property of
range class"
what can be wrong here?
Bob said:haven't we been here before?
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
Bob said:Quite a few errors in there
sFormula = "=INDEX('" & xlFile & _
"'!R2C6:R10000C6,MATCH(1,(R[-1]C[1]<=RIGHT('" & xlFile & _
"'!R2C4:R10000C4,3))*(R[-1]C[1]>=LEFT('" & xlFile & _
"'!R2C4:R10000C4,3)),0))"
Range("S" & Row).FormulaArray = sFormula
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
hi bob,
i dont know why but when i'm using this formula on the excel manualy
its ok but when i'm using it via vba its not working:
xlApp.Range("S" & row).FormulaArray = "=INDEX(xlFile &
"'!R2C6:R10000C6,MATCH(1,and((R[-1]C[1]<=RIGHT(xlFile &
"'!R2C4:R10000C4,3)),(R[-1]C[1]>=LEFT(xlFile &
"'!R2C4:R10000C4,3))),0))"
its raising the error 1004:"unable to set formulaArray property of
range class"
what can be wrong here?
Bob said:haven't we been here before?
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
hi all,
does anyone know how to save data coming form formulaarray directly to
a variable?
hi bob,
i dont thing its the xlfile issue becaouse its just the implementation
of what suppose to be there,so i think its a diffrent problem,
when i'm trying to record the formula to a maco,i'm getting msgbox that
i cannot record the formula.
are you sure that there isnt any bugs in this option,maybe i found some
problem that not supposed to be append?
Bob said:Quite a few errors in there
sFormula = "=INDEX('" & xlFile & _
"'!R2C6:R10000C6,MATCH(1,(R[-1]C[1]<=RIGHT('" & xlFile & _
"'!R2C4:R10000C4,3))*(R[-1]C[1]>=LEFT('" & xlFile & _
"'!R2C4:R10000C4,3)),0))"
Range("S" & Row).FormulaArray = sFormula
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
hi bob,
i dont know why but when i'm using this formula on the excel manualy
its ok but when i'm using it via vba its not working:
xlApp.Range("S" & row).FormulaArray = "=INDEX(xlFile &
"'!R2C6:R10000C6,MATCH(1,and((R[-1]C[1]<=RIGHT(xlFile &
"'!R2C4:R10000C4,3)),(R[-1]C[1]>=LEFT(xlFile &
"'!R2C4:R10000C4,3))),0))"
its raising the error 1004:"unable to set formulaArray property of
range class"
what can be wrong here?
Bob Phillips wrote:
haven't we been here before?
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
hi all,
does anyone know how to save data coming form formulaarray directly to
a variable?
Bob said:Well yours didn't work for me, that one did.
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
hi bob,
i dont thing its the xlfile issue becaouse its just the implementation
of what suppose to be there,so i think its a diffrent problem,
when i'm trying to record the formula to a maco,i'm getting msgbox that
i cannot record the formula.
are you sure that there isnt any bugs in this option,maybe i found some
problem that not supposed to be append?
Bob said:Quite a few errors in there
sFormula = "=INDEX('" & xlFile & _
"'!R2C6:R10000C6,MATCH(1,(R[-1]C[1]<=RIGHT('" & xlFile & _
"'!R2C4:R10000C4,3))*(R[-1]C[1]>=LEFT('" & xlFile & _
"'!R2C4:R10000C4,3)),0))"
Range("S" & Row).FormulaArray = sFormula
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
hi bob,
i dont know why but when i'm using this formula on the excel manualy
its ok but when i'm using it via vba its not working:
xlApp.Range("S" & row).FormulaArray = "=INDEX(xlFile &
"'!R2C6:R10000C6,MATCH(1,and((R[-1]C[1]<=RIGHT(xlFile &
"'!R2C4:R10000C4,3)),(R[-1]C[1]>=LEFT(xlFile &
"'!R2C4:R10000C4,3))),0))"
its raising the error 1004:"unable to set formulaArray property of
range class"
what can be wrong here?
Bob Phillips wrote:
haven't we been here before?
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
hi all,
does anyone know how to save data coming form formulaarray directly to
a variable?
hi bob,
i didnt say something regarding the suggestion you gave me,thats not
the problem,
the problem is that how it can be be the excel accepts some formula and
the vba is not accepting?
Bob said:Well yours didn't work for me, that one did.
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
hi bob,
i dont thing its the xlfile issue becaouse its just the implementation
of what suppose to be there,so i think its a diffrent problem,
when i'm trying to record the formula to a maco,i'm getting msgbox that
i cannot record the formula.
are you sure that there isnt any bugs in this option,maybe i found some
problem that not supposed to be append?
Bob Phillips wrote:
Quite a few errors in there
sFormula = "=INDEX('" & xlFile & _
"'!R2C6:R10000C6,MATCH(1,(R[-1]C[1]<=RIGHT('" & xlFile & _
"'!R2C4:R10000C4,3))*(R[-1]C[1]>=LEFT('" & xlFile & _
"'!R2C4:R10000C4,3)),0))"
Range("S" & Row).FormulaArray = sFormula
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
hi bob,
i dont know why but when i'm using this formula on the excel manualy
its ok but when i'm using it via vba its not working:
xlApp.Range("S" & row).FormulaArray = "=INDEX(xlFile &
"'!R2C6:R10000C6,MATCH(1,and((R[-1]C[1]<=RIGHT(xlFile &
"'!R2C4:R10000C4,3)),(R[-1]C[1]>=LEFT(xlFile &
"'!R2C4:R10000C4,3))),0))"
its raising the error 1004:"unable to set formulaArray property of
range class"
what can be wrong here?
Bob Phillips wrote:
haven't we been here before?
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
hi all,
does anyone know how to save data coming form formulaarray directly to
a variable?
hi bob,
i didnt say something regarding the suggestion you gave me,thats not
the problem,
the problem is that how it can be be the excel accepts some formula and
the vba is not accepting?
Bob said:Well yours didn't work for me, that one did.
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
hi bob,
i dont thing its the xlfile issue becaouse its just the implementation
of what suppose to be there,so i think its a diffrent problem,
when i'm trying to record the formula to a maco,i'm getting msgbox that
i cannot record the formula.
are you sure that there isnt any bugs in this option,maybe i found some
problem that not supposed to be append?
Bob Phillips wrote:
Quite a few errors in there
sFormula = "=INDEX('" & xlFile & _
"'!R2C6:R10000C6,MATCH(1,(R[-1]C[1]<=RIGHT('" & xlFile & _
"'!R2C4:R10000C4,3))*(R[-1]C[1]>=LEFT('" & xlFile & _
"'!R2C4:R10000C4,3)),0))"
Range("S" & Row).FormulaArray = sFormula
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
hi bob,
i dont know why but when i'm using this formula on the excel manualy
its ok but when i'm using it via vba its not working:
xlApp.Range("S" & row).FormulaArray = "=INDEX(xlFile &
"'!R2C6:R10000C6,MATCH(1,and((R[-1]C[1]<=RIGHT(xlFile &
"'!R2C4:R10000C4,3)),(R[-1]C[1]>=LEFT(xlFile &
"'!R2C4:R10000C4,3))),0))"
its raising the error 1004:"unable to set formulaArray property of
range class"
what can be wrong here?
Bob Phillips wrote:
haven't we been here before?
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
hi all,
does anyone know how to save data coming form formulaarray directly to
a variable?