ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   what this is error? (https://www.excelbanter.com/excel-programming/408626-what-error.html)

x [email protected]

what this is error?
 
[g2]="08-01-c-0001"
[g3]="08-01-c-0002"
[g4]="08-01-cx-0003"
fil3="xy"
adr = [g2:g4].Address
nnn = Application.Evaluate("=SUMPRODUCT(((MID((" & adr &
"),7,FIND(""-"",(" & adr & "),7)-7))=""" & fil3 & """)+0)")

this is code.... error occurrence
why?????




*** Sent via Developersdex http://www.developersdex.com ***

Jim Cone

what this is error?
 
What version of XL are you using?
How are the variables declared?
What is the error?
What line?
What are you trying to do?
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




wrote in message
[g2]="08-01-c-0001"
[g3]="08-01-c-0002"
[g4]="08-01-cx-0003"
fil3="xy"
adr = [g2:g4].Address
nnn = Application.Evaluate("=SUMPRODUCT(((MID((" & adr &
"),7,FIND(""-"",(" & adr & "),7)-7))=""" & fil3 & """)+0)")

this is code.... error occurrence
why?????
*** Sent via Developersdex http://www.developersdex.com ***

Bob Phillips

what this is error?
 
Worked fine for me, returned 0, but worked.

Maybe
[g2]="08-01-c-0001"
[g3]="08-01-c-0002"
[g4]="08-01-cx-0003"
fil3="xy"
adr = [g2:g4].Address
nnn = Application.Evaluate("=SUMPRODUCT(((MID((" & adr & _
"),7,FIND(""-"",(" & adr & "),7)-7))=""" & fil3 & """)+0)")


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

wrote in message
...
[g2]="08-01-c-0001"
[g3]="08-01-c-0002"
[g4]="08-01-cx-0003"
fil3="xy"
adr = [g2:g4].Address
nnn = Application.Evaluate("=SUMPRODUCT(((MID((" & adr &
"),7,FIND(""-"",(" & adr & "),7)-7))=""" & fil3 & """)+0)")

this is code.... error occurrence
why?????




*** Sent via Developersdex http://www.developersdex.com ***




Bob Phillips

what this is error?
 
BTW, too many brackets

Public Sub Test()
Dim fil3, adr, nnn
[g2] = "08-01-c-0001"
[g3] = "08-01-c-0002"
[g4] = "08-01-cx-0003"
fil3 = "xy"
adr = [g2:g4].Address
nnn = Application.Evaluate("=SUMPRODUCT((MID(" & adr & _
",7,FIND(""-"",(" & adr & "),7)-7)=""" & fil3 & """)+0)")
End Sub


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

wrote in message
...
[g2]="08-01-c-0001"
[g3]="08-01-c-0002"
[g4]="08-01-cx-0003"
fil3="xy"
adr = [g2:g4].Address
nnn = Application.Evaluate("=SUMPRODUCT(((MID((" & adr &
"),7,FIND(""-"",(" & adr & "),7)-7))=""" & fil3 & """)+0)")

this is code.... error occurrence
why?????




*** Sent via Developersdex http://www.developersdex.com ***




Ivyleaf

what this is error?
 
Hi,

I didn't have a problem with the brackets, but there appear to be one
too many sets of quotes around the ' & fil3 & ' unless I am mistaken.
Likewise it returned 0 for me though.

Cheers,

On Apr 1, 11:05*pm, "Bob Phillips" wrote:
BTW, too many brackets

Public Sub Test()
Dim fil3, adr, nnn
[g2] = "08-01-c-0001"
[g3] = "08-01-c-0002"
[g4] = "08-01-cx-0003"
fil3 = "xy"
adr = [g2:g4].Address
nnn = Application.Evaluate("=SUMPRODUCT((MID(" & adr & _
* * * *",7,FIND(""-"",(" & adr & "),7)-7)=""" & fil3 & """)+0)")
End Sub

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

wrote in message

...



[g2]="08-01-c-0001"
[g3]="08-01-c-0002"
[g4]="08-01-cx-0003"
fil3="xy"
adr = [g2:g4].Address
nnn = Application.Evaluate("=SUMPRODUCT(((MID((" & adr &
"),7,FIND(""-"",(" & adr & "),7)-7))=""" & fil3 & """)+0)")


this is code.... error occurrence
why?????


*** Sent via Developersdexhttp://www.developersdex.com***- Hide quoted text -


- Show quoted text -



Bob Phillips

what this is error?
 
They don't cause a problem, but they are redundant.

You're wrong about the quotes, they are required for text strings.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Ivyleaf" wrote in message
...
Hi,

I didn't have a problem with the brackets, but there appear to be one
too many sets of quotes around the ' & fil3 & ' unless I am mistaken.
Likewise it returned 0 for me though.

Cheers,

On Apr 1, 11:05 pm, "Bob Phillips" wrote:
BTW, too many brackets

Public Sub Test()
Dim fil3, adr, nnn
[g2] = "08-01-c-0001"
[g3] = "08-01-c-0002"
[g4] = "08-01-cx-0003"
fil3 = "xy"
adr = [g2:g4].Address
nnn = Application.Evaluate("=SUMPRODUCT((MID(" & adr & _
",7,FIND(""-"",(" & adr & "),7)-7)=""" & fil3 & """)+0)")
End Sub

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

wrote in message

...



[g2]="08-01-c-0001"
[g3]="08-01-c-0002"
[g4]="08-01-cx-0003"
fil3="xy"
adr = [g2:g4].Address
nnn = Application.Evaluate("=SUMPRODUCT(((MID((" & adr &
"),7,FIND(""-"",(" & adr & "),7)-7))=""" & fil3 & """)+0)")


this is code.... error occurrence
why?????


*** Sent via Developersdexhttp://www.developersdex.com***- Hide quoted
text -


- Show quoted text -




Ivyleaf

what this is error?
 
Hi Bob,

I stand corrected. I just checked again and I had made the mistake of
thinking his 'fil3' variable was a range, not a string.

Cheers,
Ivan.

On Apr 2, 12:03*am, "Bob Phillips" wrote:
They don't cause a problem, but they are redundant.

You're wrong about the quotes, they are required for text strings.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Ivyleaf" wrote in message

...
Hi,

I didn't have a problem with the brackets, but there appear to be one
too many sets of quotes around the ' & fil3 & ' unless I am mistaken.
Likewise it returned 0 for me though.

Cheers,

On Apr 1, 11:05 pm, "Bob Phillips" wrote:



BTW, too many brackets


Public Sub Test()
Dim fil3, adr, nnn
[g2] = "08-01-c-0001"
[g3] = "08-01-c-0002"
[g4] = "08-01-cx-0003"
fil3 = "xy"
adr = [g2:g4].Address
nnn = Application.Evaluate("=SUMPRODUCT((MID(" & adr & _
",7,FIND(""-"",(" & adr & "),7)-7)=""" & fil3 & """)+0)")
End Sub


--
HTH


Bob


(there's no email, no snail mail, but somewhere should be gmail in my
addy)


wrote in message


...


[g2]="08-01-c-0001"
[g3]="08-01-c-0002"
[g4]="08-01-cx-0003"
fil3="xy"
adr = [g2:g4].Address
nnn = Application.Evaluate("=SUMPRODUCT(((MID((" & adr &
"),7,FIND(""-"",(" & adr & "),7)-7))=""" & fil3 & """)+0)")


this is code.... error occurrence
why?????


*** Sent via Developersdexhttp://www.developersdex.com***-Hide quoted
text -


- Show quoted text -- Hide quoted text -


- Show quoted text -



x [email protected]

what this is error?
 
bob & ivan ,,, i'm sorry....
the problem was adr = [g2:g4].Address .....
that clause adr=shtname & "!" & [g2:g4].Address
the follwing the problem solved....
the sheet name.. i missed...

thank you very much...

*** Sent via Developersdex http://www.developersdex.com ***


All times are GMT +1. The time now is 10:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com