MrExcel Publishing
Your One Stop for Excel Tips & Solutions

move to


Posted by R.Brayton on July 07, 2001 7:12 PM

Iam trying to write a formula but I'm not having alot of success. I want move a record to another sheet if the criteria I set is met. So far I have:
=IF(TRUE,H1=1) which works, but I don't know how to move it to another sheet. I tried: =IF(TRUE,HI=1)THENMOVETO!SHEET3 but that didn't work.
Any suggestions?
Thank you.


Posted by steve w on July 07, 2001 8:07 PM

right click on page nametab and paste in this code

Private Sub Worksheet_Change(ByVal Target As Range)
If Sheet4.Range("h1") = 1 Then
Application.Goto _
Reference:=Sheet3.Range("A1"), Scroll:=True
End If

End Sub
hope this helps steve w

Posted by steve w on July 07, 2001 8:09 PM

forgot to say view code

forgot to say right click then veiw code then paste in the following code

Posted by R.Brayton on July 07, 2001 11:04 PM

Steve, thanks for your help but I am somewhat a begginer and the code you gave me makes no sense to me at all. More importantly, it didn't do anything. Maybe I could clarify a little; I have 6 colomns of data with the headings A thru F. Each row of 6 runs through a formula and returns either 0 or 1 in column H for each row. If a 1 is retunrd to column H, I want to move that row(i.e. A1-F1) to another defined sheet. Say sheet 3. Make sense?
Thanks for your time.