• 0

an Excel Macro or function?


Question

I need abit of help doing this, i've never really used excel and was wondering how to check weither or not a value say in coloum A1 exists anywhere in coloum A2.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

NVM worked it out... about 4hrs ago, forgot to say i did it.

For those who want to know...

Sub checker()

Dim iTotal As Integer
Dim xTotal As Integer
iTotal = InputBox("First Columns Length")
xTotal = InputBox("Second Columns Length")
For i = 0 To iTotal - 1
Range("A1").Select
ActiveCell.Offset(i, 0).Select
    For x = 0 To xTotal
        If ActiveCell.Value = ActiveCell.Offset(x - i, 1).Value Then
            ActiveCell.Offset(0, 2).Value = ActiveCell.Value
        End If
    Next x
Next i

End Sub

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.