Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to check to see if a value of an active cell is contained in another
range of cells elsewhere in my spreadsheet. Bascially a Match. I am trying to pass the list of values to a variable called PMSMatchRange. Then I am looping thougth active cells and useing the Match function on the active cell agains the master list. I originally thought I had to Dimension the PMSMatchRange variable as an object but this is giving me a 424 Error Object Required when it reaches the Set statement. What am I doing wrong? Dim PMSMatchRange As Object vbPMSCodeList.Select vbPMSCodeList.Range("A2").Select vbPMSCodeList.Range(Selection, Selection.End(xlDown)).Select Set PMSMatchRange = vbPMSCodeList.Range(Selection, Selection.End(xlDown)).Select For X = 1 To NumPMSCodes ActiveCell = Range("B2").Offset(X - 1, 0) If IsError(Application.Match(ActiveCell.Value, PMSMatchRange, 0)) Then MsgBox ("You have PMS Codes in your import sheet that do not exist in your PMS Master List.") End If Next |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Clearly seeing active cell in a range | Excel Discussion (Misc queries) | |||
ClearContents method on a passed range | New Users to Excel | |||
PrintOut macro from ?passed range.addrsess | Excel Programming | |||
segregating passed range by rows and columns | Excel Programming | |||
Translate range name passed as string to a custom function to range addresses! | Excel Programming |