PC Review


Reply
Thread Tools Rate Thread

Comparing two cells

 
 
Geoff
Guest
Posts: n/a
 
      29th Jul 2009
Hi,

Im very new to VB and would appreciate some help.

I need some code which compares two cells (AH1 & AI1) and if there is a
difference then the code runs a Macro (called DisplayCalendar)

Thanks

 
Reply With Quote
 
 
 
 
K
Guest
Posts: n/a
 
      29th Jul 2009
Copy below code in Worksheet Module (Right click on Tab , Click on
"View Code" , Paste below code)

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("AH1").Value <> Range("AI1").Value Then
Call DisplayCalendar
End If
End Sub

Regards
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
comparing cells James Microsoft Excel Misc 1 18th Nov 2008 10:17 PM
sum a set of cells based on comparing a different set of cells BSweeney Microsoft Excel Worksheet Functions 3 15th May 2008 06:02 PM
Need Help Comparing Cells Matt H Microsoft Excel Misc 4 3rd May 2008 05:24 AM
Comparing cells with text to cells with numeric values. David B Microsoft Excel Programming 1 25th Apr 2008 08:05 PM
Comparing cells Charles Suhr Microsoft Access 0 15th Sep 2003 03:10 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:15 AM.