A little help with some code please.
What I am trying to do: I have a bunch of data on SHEET1. If the value of A7 <= 0 I would like to have a button show up in P7 that says “MOVE”. If you click that “MOVE” button it will cut B7 through H7 from the sheet and append it to SHEET2. Then go back to SHEET1 and (I guess) move up B7 through H7. The problem is there are formulas in A, I, J, K, L, M, and N. so I just cant CUT the whole line as it will mess up all my formulas. Thank you very much for your help in this matter. Ken -- sungen99 ------------------------------------------------------------------------ sungen99's Profile: http://www.excelforum.com/member.php...fo&userid=9144 View this thread: http://www.excelforum.com/showthread...hreadid=537233 |
A little help with some code please.
I do not know where you want paste data?,
but taste this: (I think, that you have already button). Private Sub CommandButton1_Click() Application.ScreenUpdating = False Range("B7:H7").Select Selection.Copy Sheets(2).Select Sheets(2).Range("B7").Select Sheets(2).Paste Sheets(1).Select Application.CutCopyMode = False Selection.Delete Shift:=xlUp Range("B7").Select Application.ScreenUpdating = True End Sub Kind Regards, Andrzej sungen99 napisał(a): What I am trying to do: I have a bunch of data on SHEET1. If the value of A7 <= 0 I would like to have a button show up in P7 that says �MOVE�. If you click that �MOVE� button it will cut B7 through H7 from the sheet and append it to SHEET2. Then go back to SHEET1 and (I guess) move up B7 through H7. The problem is there are formulas in A, I, J, K, L, M, and N. so I just cant CUT the whole line as it will mess up all my formulas. Thank you very much for your help in this matter. Ken |
All times are GMT +1. The time now is 12:54 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com