Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default Compare cells and force most recent change

Jacob, Your the best...

"Jacob Skaria" wrote:

You dont need to loop..Either use Range.Find or
worksheetfunction.Match...Select the sheet tab 2 which you want to work with.
Right click the sheet tab and click on 'View Code'. This will launch VBE.
Paste the below code to the right blank portion. Get back to to workbook and
try out.

PS: The 1st sheet is referred as 'Sheet1;. Change to suit your requirement


Private Sub Worksheet_Change(ByVal Target As Range)
Dim ws As Worksheet, rngTemp As Range
If Not Application.Intersect(Target, Range("P1:P100")) Is Nothing Then
If Target.Cells.Count = 1 And Trim(Range("B" & Target.Row)) < "" Then
Set ws = Worksheets("Sheet1"): Application.EnableEvents = False
Set rngTemp = ws.Columns(2).Find(Range("B" & Target.Row))
If Not rngTemp Is Nothing Then ws.Range("P" & rngTemp.Row) = Target.Text
End If
End If
Application.EnableEvents = True
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Looping through" wrote:

Is it possible to type some text into a cell on page 2 and force the changes
to a matching cell in sheet 1.

I.E
Sheet 2 line # 386, Note (Cell P386) = "10/1/09 - Should get order. 9/15/09
- Rep to follow up next week"
Sheet 1 line 1000, Note (Cell P1000 = "9/15/09 - Rep to follow up next week"

I want to be able to duplicate the notes in both worksheets without having
to go find the referenced line item and re-type the same info twice. My hope
is to keep everything consistant between sheets.

FYI... the line items will share a common # in Cell B.

Any help or direction will be great

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
how to force excel not to change date? tgi Excel Discussion (Misc queries) 2 October 1st 09 03:33 AM
Force file name change Otto Moehrbach Excel Programming 0 May 15th 06 05:52 PM
Compare multiple dates, can enumerate cell based on most recent date Brian Excel Worksheet Functions 7 May 9th 06 11:02 PM
How do I compare cells and if FALSE compare to next cell in EXCEL Cindie Excel Worksheet Functions 0 March 24th 06 05:29 PM
Force format change in excel Benson Excel Worksheet Functions 5 November 29th 05 10:41 AM


All times are GMT +1. The time now is 12:14 AM.

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"