IF Mytest.count>0 then VLOOKUP

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All......

I have a line of code that does a test

If MyTest.Count > 0 Then

What I would like "then", is if the macro would look up the WorkBook name
on "SpecificSheet" in column A, and step over to the right "X" columns
(according to the value in cell K1) and place the result of Mytest.count
therein.....

Is this a doable thing?

TIA for suggestons/solutions
Vaya con Dios,
Chuck, CABGx3
 
If MyTest.Count > 0 Then
On Error Resume Next
ans =
application.Match(Activeworkbok.Name,Worksheets("SpecificSheet").Columns(1),
0)
If IsError(ans) Then
MsgBox "Not found"
Else
Worksheets("SpecificSheet").Cells(ans, Range("K1").Value).Value
= myTest.Count
End If
End If

untested, but should get you started

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top