Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Marco program


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Marco program

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Marco Puzzled Excel Discussion (Misc queries) 3 July 30th 07 05:09 PM
I need some help with a Marco xgunda420x Excel Discussion (Misc queries) 2 August 2nd 05 01:43 PM
Marco to run every day at 12 bris Excel Programming 6 March 3rd 04 01:07 PM
merging excel program with tdc finance program judy Excel Programming 0 November 5th 03 08:01 PM
marco David Kuehl Excel Programming 4 September 18th 03 11:37 PM


All times are GMT +1. The time now is 07:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"