Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
[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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Counting instances of found text (Excel error? Or user error?) | Excel Worksheet Functions | |||
Error Handling - On Error GoTo doesn't trap error successfully | Excel Programming | |||
run-time error '1004': Application-defined or object-deifined error | Excel Programming | |||
Automation Error, Unknown Error. Error value - 440 | Excel Programming |