-
Hi Hrishna,
Rename a worksheet as All. Put this code in a standard module and run it in another sheet. You'll see the resultanr formulae in a block of cells.
[vba]
Sub Test()
Firstcopyrow = 10
datarowspersheet = 5
Range("C" & Firstcopyrow & ":F" & Firstcopyrow + datarowspersheet - 1).Formula = _
"=SUMIF(All!$A$2:$A$3000,""*""&$C$2&""*""&$B" & Firstcopyrow & ",All!F$2:F$3000)"
End Sub
[/vba]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules