Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Cut selected value frm sheet1 & paste value to sheet2


In Sheet1, I have data in A2:F2, follow by G2 have checkbox1 (usin
Control ToolBox VBA),similiar data in A3:F3 and G3 have anothe
checkbox2. A4:F4 and G4 have another checkbox3

Example,

If checkbox1 box is untick, the Range("A2:F2") is Select and Cut t
A14:F14 (First Row)
If checkbox2 box is tick, the Range("A3:F3") is select and Cut an
paste to Sheet2 (First Row, Example: A2:F2)
If checkbox3 is untick, the Range("A4:F4") is Select and Cut to nex
row of the A14:F14.

I need the coding to check if checkbox(i) is untick, the selected dat
will cut and paste start from A14:F14, no matter which checkbox(i) i
tick first, the A14 should be the first row to paste the value. Progra
also need to check if first row of A14:F14 contain data,then past
another value to next rows. (Below is my sample coding)


If CheckBox1.Value = False Then
'checkbox 1 is untick move to A14 (e.g.)
If myCount1 < 0 Then
Range("$A$2:$E$2").Select
Range("$A$2:$E$2").Cut
NextRow = Range("A65536").End(xlUp).Row + 1
Range("A" & NextRow).Select
ActiveSheet.Paste
End If
Else

'checkbox1 is tick move to sheet2, range start from (A2)
'Question: If i harcoding the paste location, It will replace the valu
that i paste. (see below)
'Example: If checkbox2=true then, select and Cut checkbox2 Range (E.g
"A3:F3"), then activate sheet2, select Range("A2") and 'paste.

'I need to write a coding the second paste value should be the next ro
of A2 and following by other.


End I

--
bernardn
-----------------------------------------------------------------------
bernardng's Profile: http://www.excelforum.com/member.php...fo&userid=3411
View this thread: http://www.excelforum.com/showthread.php?threadid=53894

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 copy from sheet1 then paste special transpose to sheet2,3,4 Christine Excel Discussion (Misc queries) 2 July 22nd 09 09:50 PM
copy data from sheet2 to sheet1 when sheet2 has variable # of rows Anne Excel Discussion (Misc queries) 6 February 27th 09 09:48 PM
Macro to Copy data from a list in sheet1 and paste into sheet2 Michael Excel Discussion (Misc queries) 3 April 23rd 08 06:52 PM
multiple search criteria to find and copy from sheet1 and paste into sheet2 lothario[_54_] Excel Programming 2 November 25th 03 09:57 AM
Search, find, copy from sheet1 and paste into sheet2 lothario[_47_] Excel Programming 4 November 9th 03 09:07 AM


All times are GMT +1. The time now is 05:26 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"