PDA

View Full Version : 2 Dimensions of a table



eran3185
12-03-2007, 01:51 PM
hi
i have 12 tables (shee2).
the rows not in the same order (i.e: first table : "total 2" in the last row , second table : "total 2" in the Middle).

i want to get all the cells in the "total" sheet.

i.e : cell b3 in "total" Represents cell b6 in "sheet2"
cell c9 in "total" Represents cell g12 in "sheet2"

:doh:

Bob Phillips
12-03-2007, 02:20 PM
Public Sub ProcessData()
Const TEST_COLUMN As String = "A" '<=== change to suit
Dim i As Long
Dim LastRow As Long
Dim NextRow As Long

With Worksheets("Sheet2")

LastRow = .Cells(.Rows.Count, TEST_COLUMN).End(xlUp).Row
NextRow = 3
For i = 6 To LastRow
If IsDate(.Cells(i, TEST_COLUMN).Value) Then
.Rows(i).Copy Worksheets("TOTAL").Cells(NextRow, "A")
NextRow = NextRow + 1
End If
Next i

End With

End Sub

eran3185
12-03-2007, 02:22 PM
thenks !

i wonder if there is a way by using vlookup+elookup or something like match / index ?