Scripting Error

  • Thread starter Thread starter Jane Doe
  • Start date Start date
J

Jane Doe

Can anyone else help with this have a deadline. Thanks!

I received a Runtime 13 type "mismatch error" ???

Sub CreateaMain()

ShtNames = Array("May 08_478156199", "May 08_4614445456", "June
08_478156199", "June 08_461445456", "July 08_478156199", "July 08_461445456")
With Sheets("Phones_Analysis_9-2008")
LastRow = .Range("F" & Rows.Count).End(xlUp).Row
For ShtNum = LBound(ShtNames) To UBound(ShtNames)
Set Sht = Sheets(ShtNames(ShtNum))
For RowCount = 1 To LastRow
PhoneNum = .Range("F" & RowCount)
Set c = Sht.Columns("A").Find(what:=PhoneNum, _
LookIn:=xlValues, lookat:=xlWhole)
If Not c Is Nothing Then
.Cells("B" & RowCount).Offset(0, ShtNum) = _
Sht.Range("P" & c.Row)
End If
Next RowCount
Next ShtNum
End With
End Sub
 
Check one of your other posts.

Jane said:
Can anyone else help with this have a deadline. Thanks!

I received a Runtime 13 type "mismatch error" ???

Sub CreateaMain()

ShtNames = Array("May 08_478156199", "May 08_4614445456", "June
08_478156199", "June 08_461445456", "July 08_478156199", "July 08_461445456")
With Sheets("Phones_Analysis_9-2008")
LastRow = .Range("F" & Rows.Count).End(xlUp).Row
For ShtNum = LBound(ShtNames) To UBound(ShtNames)
Set Sht = Sheets(ShtNames(ShtNum))
For RowCount = 1 To LastRow
PhoneNum = .Range("F" & RowCount)
Set c = Sht.Columns("A").Find(what:=PhoneNum, _
LookIn:=xlValues, lookat:=xlWhole)
If Not c Is Nothing Then
.Cells("B" & RowCount).Offset(0, ShtNum) = _
Sht.Range("P" & c.Row)
End If
Next RowCount
Next ShtNum
End With
End Sub
 
You found the other post and responded. I answered there with another
suggestion.

It becomes a real pain--for both you and potential responders when you post the
same question multiple times.

You have to check all your threads. And responders may waste their time by
posting when you have an answer elsewhere.
 
I haven't found that post yet, but you're right. I guess I got a little
desperate for help.

My husband used to help me with VB, but passed away this May. My job
depends on this project...sorry for the desperation. I will be more careful
not to double post.

On the other hand, one of the posts was a separate question. When I get
notification that a reply has come I click on link and it brings up blank
page. At first the first post I could not relocate. Thanks for the advice.


Dave Peterson said:
And Joel posted the typo fix in one of the other threads.
 
Back
Top