check this out
Public Sub test()
Dim dt As Variant
dt = Sheets(1).Cells(3, 4)
MsgBox dt
A = Application.Match(dt, Range("B2:EP2"), 0)
MsgBox (A)
End Sub
Regards,
Mandeep Baluja
On Sunday, July 26, 2015 at 5:00:04 PM UTC+5:30, Mohamed Elamrani wrote:
>
> Sorry for bothering you i'm ne
Sorry for bothering you i'm new in VBA
I am trying to use the MATCH function in VBA to search for a particular
hour in a range containing hours and return the matching column number
that give me Error N°13 so thank you for your help
Public Sub test()
With Sheets("F. Regulation")
Dim dt A
Hi Mike,
Below is the code to find string and paste it into desired cell.
Please find the attached excel file.
'Code was written by Jayaraju Metta
Sub matchsting()
i = 1
While (ThisWorkbook.Sheets("Sheet1").Cells(i, 1).Value <> "")
ColoumnAstring = Left(Trim(Sheets("Sheet1").Cells(i, 1).Value), 5