Consulting

Results 1 to 3 of 3

Thread: 2 Dimensions of a table

  1. #1

    2 Dimensions of a table

    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"


  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]

    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
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    thenks !

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •