Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to move the contents of column E to column D if column B -
C. The code I have works for one row, I have tried and failed many times in an attempt to repeat it until row 24. How would I make this repeat each row until 24. (It starts on 2) I am sure there is an easier way to do this, but my abilities are lacking. Private Sub CommandButton1_Click() If Range("B2") = "C" Then If Range("E2") < "" Then With Range("E2").Copy Range("D2").PasteSpecial Paste:=xlValues Range("E2").Clear End With End If End If End Sub Thanks, Josh *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
repeat code remove | Excel Worksheet Functions | |||
How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook? | Excel Worksheet Functions | |||
VBA Code To have a macro repeat on all sheets in a workbook | Excel Worksheet Functions | |||
Repeat Code Repetitive Actions? | Excel Discussion (Misc queries) | |||
How to repeat code for 11 files? | Excel Programming |