+ Reply to Thread
Results 1 to 7 of 7

IF formula true THEN move to next row

Hybrid View

zepelin IF formula true THEN move to... 12-27-2012, 12:00 PM
mike7952 Re: IF formula true THEN move... 12-27-2012, 12:18 PM
zepelin Re: IF formula true THEN move... 12-28-2012, 03:57 AM
Kevin UK Re: IF formula true THEN move... 12-27-2012, 12:53 PM
zepelin Re: IF formula true THEN move... 12-28-2012, 04:16 AM
mike7952 Re: IF formula true THEN move... 12-28-2012, 06:24 AM
zepelin Re: IF formula true THEN move... 12-28-2012, 06:56 AM
  1. #1
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: IF formula true THEN move to next row

    here' one way

    Sub abc()
     Dim a, b, i As Long, ii As Long, n As Long
     
     With Worksheets("sheet1")
        a = .Range("I1").CurrentRegion
     
        ReDim b(1 To Rows.Count, 1 To 3)
        
        For i = 2 To UBound(a, 1)
           For ii = 2 To UBound(a, 2)
               If Not IsEmpty(a(i, ii)) And a(i, ii) > 0 Then
                   n = n + 1
                   b(n, 1) = a(i, 1)
                   b(n, 2) = a(1, ii)
                   b(n, 3) = a(i, ii)
               End If
           Next
        Next
        .Cells(6, "c").Resize(n, 3) = b
     End With
    End Sub
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  2. #2
    Registered User
    Join Date
    12-27-2012
    Location
    Cluj-Napoca
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: IF formula true THEN move to next row

    your formula is what i need.
    how can i bring the new data to a new sheet? so that my first table remains untouched
    Last edited by zepelin; 12-28-2012 at 05:02 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1