Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Hi. I need a code that does the following please. Copy and pastes a row from tab 1 (“April”) to tab 2 (“May”). However if there’s a ‘0’ in column H then I only want it to paste the row from column B onwards. If there’s a ‘1’ in column H, I need it to copy and paste the entire row. I’d also like it to paste in the row same on the 2nd tab. For example if its in row 5 on tab 1 I’d like it to appear in row 5 on tab 2. I’d like it also to appear automatically in the 2nd tab after inputting the number 0 or 1 into the column H. Hope this all makes sense.
|
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Am Tue, 16 Apr 2013 16:20:29 +0100 schrieb missexcel12: Hi. I need a code that does the following please. Copy and pastes a row from tab 1 (“April”) to tab 2 (“May”). However if there’s a ‘0’ in column H then I only want it to paste the row from column B onwards. If there’s a ‘1’ in column H, I need it to copy and paste the entire row. I’d also like it to paste in the row same on the 2nd tab. For example if its in row 5 on tab 1 I’d like it to appear in row 5 on tab 2. I’d like it also to appear automatically in the 2nd tab after inputting the number 0 or 1 into the column H. Hope this all makes sense. copy the sheet and name the copy "May". And then delete the cells in A if in H is 0 Regards Claus Busch -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
#3
![]() |
|||
|
|||
![]()
Hi. Thanks for this. Unfortunately I need a code to complete this automatically as the tabs are already set up with other formulas.
Quote:
|
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Am Wed, 17 Apr 2013 09:58:41 +0100 schrieb missexcel12: Hi. Thanks for this. Unfortunately I need a code to complete this automatically as the tabs are already set up with other formulas. try: Sub CopyAndDelete() Dim LRow As Long Sheets("April").Copy After:=Sheets("April") With ActiveSheet .Name = "Mai" LRow = .Cells(.Rows.Count, "H").End(xlUp).Row .Range("A1:H" & LRow).AutoFilter Field:=8, Criteria1:=0 .Range("A2:A" & LRow).ClearContents .AutoFilterMode = False End With End Sub Regards Claus Busch -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy loses order of Conditional Formatting rules | Excel Discussion (Misc queries) | |||
Paste conditional formatting rules | Excel Discussion (Misc queries) | |||
how do I set up a validation rules with two data rules | Excel Worksheet Functions | |||
Tool / Code to copy and paste only the conditional formatting rules | Excel Programming | |||
Excel cut/Paste Problem: Year changes after data is copy and paste | Excel Discussion (Misc queries) |