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)
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,
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
(there's no email, no snail mail, but somewhere should be gmail in my
addy)
[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 -