Results 1 to 8 of 8

Putting formula and drag down

Threaded View

  1. #1
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Putting formula and drag down

    Hi.
    I'm trying a formula in "H2", but the code is giving error
    Sub Test()
        Dim rng As Range
        Dim ws As Worksheet
         
        Set ws = Sheets("Folha1")
        Set rng = ws.Range("G9000").End(xlUp).Offset(, 7)
         
        With ws.Range("H2").Resize(rng.Row - 2 + 1, 1)
        .Formula = "=SE(Folha2!$E$2:$E$97=0;SOMARPRODUTO((B2=Folha2!$C$2:$C$324)*(Folha1!H$1=Folha2!$D$2:$D$324)*Folha2!$E$2:$E$324);"")"
        End With
         
        End Sub
    Last edited by marreco; 05-15-2012 at 01:53 PM.
    "No xadrez nem sempre a menor dist?ncia entre dois pontos ? uma linha reta" G. Kasparov.

    If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select b from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.

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