Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Try somethink like the following (sustituting) the names of your ranges. List1 contains all items. List2 in the "Out of stocK" list. Sub CheckStock() Dim oCell As Range For Each oCell In Range("List1") If IsError(Application.Match(oCell, Range("List2"), 0)) Then oCell.Offset(0, 1) = "OK" Else oCell.Offset(0, 1) = "Out of stock" End If Next End Sub ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Compare values on sheet 1 to values on sheet2 | Excel Worksheet Functions | |||
Excel Compare values in columns & display missing values in a new | Excel Discussion (Misc queries) | |||
Compare Listbox values with Collection values | Excel Programming | |||
compare values between workbooks and copy values | Excel Programming |