define column as an object

fari1

Active Member
Joined
May 29, 2011
Messages
362
hi,
i want to define column A of sheet1 as an object.
meaning for every text value in column A of sheet1, i want to find that value in column A of sheet2, if found then want to execute a function, else just exit sub
Thanking u in advance.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
This is pseudo-code, it will not work if you copy-paste, but should give you an idea of where to start.

Code:
intLastRow = Range("A1").End(xlDown)
For i = 1 to intLastRow
    If Application.WorksheetFunction.IsText(Range("A" & i)) Then
        Find Range("A" & i).Value [wherever your second list is]
        [execute whatever function]
    End If
Next i
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,291
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top