Need someone to look at this code line for me

A

Ayo

I am getting a #Name? error and I have looked at this line so many times
over and I can't find anything that is remotely close to being or generating
an error like #NAME?.
I need someone else to take a look at this for me and see if they can find
the error.

Thanks

c.Offset(0, 4) = Evaluate("=SUMPRODUCT(--('BO Download'!$A$" & startRow &
":$A$" & endRow & "=" & marketName & "),--('BO Download'!$E$" & startRow &
":$E$" & endRow & "=C" & c.Row & ")," & _
"--('BO Download'!$G$" & startRow &
":$G$" & endRow & "<>""""),--('BO Download'!$H$" & startRow & ":$H$" & endRow
& "=""A""))")
 
S

smartin

Ayo said:
I am getting a #Name? error and I have looked at this line so many times
over and I can't find anything that is remotely close to being or generating
an error like #NAME?.
I need someone else to take a look at this for me and see if they can find
the error.

Thanks

c.Offset(0, 4) = Evaluate("=SUMPRODUCT(--('BO Download'!$A$" & startRow &
":$A$" & endRow & "=" & marketName & "),--('BO Download'!$E$" & startRow &
":$E$" & endRow & "=C" & c.Row & ")," & _
"--('BO Download'!$G$" & startRow &
":$G$" & endRow & "<>""""),--('BO Download'!$H$" & startRow & ":$H$" & endRow
& "=""A""))")

I get #VALUE error.

Suggest you take the whole mess after Evaluate( , put it in a string,
and print it to the debug window you can see what is actually being
evaluated.
 
P

p45cal

That might depend on what's in the variable marketName.
If it's astring then you might need to change
& marketName &
to
& """"marketName"""" &
 
A

Ayo

marketNAme is a string variable. I tried your suggestion & """"marketName""""
&
but that that only created a compile error
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top