ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   IF Mytest.count0 then VLOOKUP (https://www.excelbanter.com/excel-programming/326462-if-mytest-count-0-then-vlookup.html)

CLR

IF Mytest.count0 then VLOOKUP
 
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





Bob Phillips[_6_]

IF Mytest.count0 then VLOOKUP
 

If MyTest.Count 0 Then
On Error Resume Next
ans =
application.Match(Activeworkbok.Name,Worksheets("S pecificSheet").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)


"CLR" wrote in message
...
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








All times are GMT +1. The time now is 02:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com