Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default Need someone to look at this code line for me

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""))")
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 915
Default Need someone to look at this code line for me

Ayo wrote:
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.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default Need someone to look at this code line for me

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


"Ayo" wrote:

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""))")

  #4   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default Need someone to look at this code line for me

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


"p45cal" wrote:

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


"Ayo" wrote:

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""))")

  #5   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default Need someone to look at this code line for me

Thanks p45cal. & """marketName""" & worked instead.

"p45cal" wrote:

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


"Ayo" wrote:

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""))")

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro code to put series name next to individual line in line grap Otani Charts and Charting in Excel 3 February 23rd 10 07:24 PM
Code to read file in reverse fast line by line ChristopherL Excel Programming 3 October 1st 08 12:45 AM
Single line of code with line separator KarenF Excel Programming 4 August 19th 08 01:43 AM
Code to delete a Line in a another code helmekki[_88_] Excel Programming 1 August 8th 05 01:14 AM
Continue line of VBA code on the next line peacelittleone Excel Programming 9 June 24th 05 07:46 PM


All times are GMT +1. The time now is 03:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"