Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to copy from sheet1 then paste special transpose to sheet2,3,4 | Excel Discussion (Misc queries) | |||
copy data from sheet2 to sheet1 when sheet2 has variable # of rows | Excel Discussion (Misc queries) | |||
Macro to Copy data from a list in sheet1 and paste into sheet2 | Excel Discussion (Misc queries) | |||
multiple search criteria to find and copy from sheet1 and paste into sheet2 | Excel Programming | |||
Search, find, copy from sheet1 and paste into sheet2 | Excel Programming |