Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What I would like to do is look at a range (A6:IXXX), where XXX is the
last row of the range, and if there is NOT an "X" in I6, copy that row to another range (K6:S6), this would look at each row and copy to the new range if "I" is empty. Is this possible to do? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this
Sub MoveRange() Dim I As Long Dim aLastRow As Long Dim dLastRow As Long Dim ws As Worksheet Dim aRange As Range Dim dRange As Range Set ws = Worksheets(2) aLastRow = ws.Cells(Rows.Count, 1).End(xlUp).Row For I = 6 To aLastRow Set aRange = Range("I" & I) If aRange.Value < "X" Then Set aRange = Range("A" & I, aRange) dLastRow = dLastRow + 1 Set dRange = Range("K" & dLastRow) aRange.Cut dRange End If Next End Sub "Fester" wrote: What I would like to do is look at a range (A6:IXXX), where XXX is the last row of the range, and if there is NOT an "X" in I6, copy that row to another range (K6:S6), this would look at each row and copy to the new range if "I" is empty. Is this possible to do? . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I add a variable range of columns depending on criteria | Excel Worksheet Functions | |||
copy cell a1 to 1 of 2 wrkshts depending on the value of other cel | Excel Programming | |||
How do I copy a row depending on the content of a cell in the row | Excel Worksheet Functions | |||
Selecting range in list of range names depending on a cell informa | Excel Discussion (Misc queries) | |||
Automated cell copy depending on cell content? | Excel Programming |