Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi guys I am news in marcos programming and I like - to compare two coloums (A, B) from 2 sheets - i need to see weather any values in coloumn A are missing from clom B thanks for your help -- Freeman_100 ------------------------------------------------------------------------ Freeman_100's Profile: http://www.excelforum.com/member.php...o&userid=33208 View this thread: http://www.excelforum.com/showthread...hreadid=530241 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe something like:
Option Explicit Sub testme() Dim myRngA As Range Dim myRngB As Range Dim myCell As Range Dim res As Variant With Worksheets("sheet1") Set myRngA = .Range("A1", .Cells(.Rows.Count, "A").End(xlUp)) End With With Worksheets("sheet2") Set myRngB = .Range("A1", .Cells(.Rows.Count, "A").End(xlUp)) End With For Each myCell In myRngA.Cells res = Application.Match(myCell.Value, myRngB, 0) If IsError(res) Then myCell.Offset(0, 1).Value = "Missing" Else myCell.Offset(0, 1).Value = "Ok" End If Next myCell End Sub will get you started. Freeman_100 wrote: Hi guys I am news in marcos programming and I like - to compare two coloums (A, B) from 2 sheets - i need to see weather any values in coloumn A are missing from clom B thanks for your help -- Freeman_100 ------------------------------------------------------------------------ Freeman_100's Profile: http://www.excelforum.com/member.php...o&userid=33208 View this thread: http://www.excelforum.com/showthread...hreadid=530241 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Marco | Excel Discussion (Misc queries) | |||
I need some help with a Marco | Excel Discussion (Misc queries) | |||
Marco to run every day at 12 | Excel Programming | |||
merging excel program with tdc finance program | Excel Programming | |||
marco | Excel Programming |