Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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 ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default 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 ***
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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 ***



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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 ***



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default 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 -




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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 -



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default 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 -


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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 ***
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
Counting instances of found text (Excel error? Or user error?) S Davis Excel Worksheet Functions 5 September 12th 06 04:52 PM
Error Handling - On Error GoTo doesn't trap error successfully David Excel Programming 9 February 16th 06 05:59 PM
run-time error '1004': Application-defined or object-deifined error [email protected] Excel Programming 5 August 10th 05 09:39 PM
Automation Error, Unknown Error. Error value - 440 Neo[_2_] Excel Programming 0 May 29th 04 05:26 AM


All times are GMT +1. The time now is 02:24 PM.

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

About Us

"It's about Microsoft Excel"