MrExcel Publishing
Your One Stop for Excel Tips & Solutions

copy contents of a cell and paste to another sheet


Posted by mark on June 07, 2001 2:29 PM

what i need to do is this:
on sheet 2,i have 2 columns A and B.when text is entered in one of the cells in column B,i need the information next to that cell in column A copied into a specific cell on sheet 1(this "target cell" will always be the same destination)

is this possible?

thanks in advance


Posted by Damon Ostrander on June 07, 2001 11:05 PM

Mark,

Yes, it is quite straightforward. Just use the Worksheet_Change event to trap that you have entered data on Sheet 2. Test Target to determine if the cell that changed is in column B. If it is, offset the target over one column to the left and put that value into the cell on Sheet 1.

if Target.Column = 2 then
Worksheets(1).Range("Target Cell") = Target.Offset(0,-1).Value
End If

Damon