
Signature
Regards
VBA.Newb.Confused
XP Pro
Office 2007
Auuugghhhh!
LOL
Now I get an "Application defined error" 1004?
At the line below.
'======
ActiveCell.Formula = "=MID(D6,4,FIND(""-"",D6)-4)&IF(RIGHT(D6)="")"",""
CONT"","")"
'======
Code in its entirety.
'======
Sub SetOpNumIPI()
Application.DisplayAlerts = False
For i = 4 To Worksheets.Count 'Ignore first three sheets
Sheets(i).Activate 'start with first IPI data sheet
ActiveSheet.Unprotect "2000"
Range("D4").Select
Selection.NumberFormat = "General"
ActiveCell.Formula =
"=MID(D6,4,FIND(""-"",D6)-4)&IF(RIGHT(D6)="")"","" CONT"","")"
Range("B6").Select
ActiveCell.FormulaR1C1 = "SHT"
Range("D6").Select
Selection.NumberFormat = "General"
ActiveCell.FormulaR1C1 = _
"=MID(CELL(""filename"",R[-5]C[-3]),SEARCH(""]"",CELL(""filename"",R[-5]C[-3]))+1,1024)"
Range("D10").Select
ActiveSheet.Protect "2000"
Next i
Sheets("Master Sheet").Select
Application.DisplayAlerts = True
End Sub
'======

Signature
Regards
VBA.Newb.Confused
XP Pro
Office 2007
> Geez!
> I was missing double quotes on
[quoted text clipped - 29 lines]
> > > >
> > > > As always, any help is appreciated!
Rick Rothstein (MVP - VB) - 06 Mar 2008 17:33 GMT
You dropped one of the (doubled up) quote marks after the last comma. See if
this works for you...
ActiveCell.Formula = "=MID(D6,4,FIND(""-"",D6)-4)&IF(RIGHT(D6)="")"","
"" CONT"","""")"
Rick
> Auuugghhhh!
> LOL
[quoted text clipped - 65 lines]
>> > > >
>> > > > As always, any help is appreciated!
Rick S. - 06 Mar 2008 18:25 GMT
Yes sir, that worked!
These "quotes" remind me of LISP!
Thanks again!

Signature
Regards
VBA.Newb.Confused
XP Pro
Office 2007
> You dropped one of the (doubled up) quote marks after the last comma. See if
> this works for you...
[quoted text clipped - 73 lines]
> >> > > >
> >> > > > As always, any help is appreciated!