Results 1 to 9 of 9

Help with R1C1-formula

Threaded View

  1. #8
    Forum Contributor
    Join Date
    04-25-2013
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    150

    Re: Help with R1C1-formula

    I think I got it, though it's not in R1C1 format

    Sub torrdo()
    Dim lastrow As Long
    
    lastrow = Sheets("lajittelu").Cells(Rows.Count, "b").End(xlUp).Row
    
    Sheets("huuhaa").Range("m1").Select
        Do Until ActiveCell.Row = lastrow
            ActiveCell.Formula = "=IF(" & ActiveCell.Offset(0, 2).address & ">1,SUMPRODUCT((huuhaa!G1:G" & lastrow & "=lajittelu!" & activecell.offset(0,-6).address & ")*(huuhaa!H1:H" & lastrow & "=lajittelu!" & ActiveCell.Offset(0, -5).address & ")*(huuhaa!K1:K" & lastrow & "=lajittelu!" & ActiveCell.Offset(0, -2).address & ")*(huuhaa!O1:O" & lastrow & "=lajittelu!" & ActiveCell.Offset(0, 2).address & ")*(huuhaa!M1:M" & lastrow & ")),SUMPRODUCT((huuhaa!G1:G" & lastrow & "=lajittelu!" & _
            ActiveCell.Offset(0, -6).address & ")*(huuhaa!H1:H" & lastrow & "=lajittelu!" & ActiveCell.Offset(0, -5) & ")*(huuhaa!K1:K" & lastrow & "=lajittelu!" & ActiveCell.Offset(0, -2).address & ")*(huuhaa!M1:M" & lastrow & "))-SUMPRODUCT((huuhaa!G1:G" & lastrow & "=lajittelu!" & ActiveCell.Offset(0, -6).address & ")*(huuhaa!H1:H" & lastrow & "=lajittelu!" & ActiveCell.Offset(0, -5).address & ")*(huuhaa!K1:K" & lastrow & "=lajittelu!" & ActiveCell.Offset(0, -2).address & ")*(huuhaa!O1:O" & lastrow & "=lajittelu!" & ActiveCell.Offset(0, 2).address & ")*(huuhaa!M1:M" & lastrow & ")))"
        ActiveCell.Offset(1, 0).Select
        Loop
        
    End Sub
    Last edited by djdjdj; 02-06-2014 at 08:27 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. r1c1 formula
    By mma3824 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-01-2012, 03:48 PM
  2. [SOLVED] Formula R1C1 Not Working
    By timbo1957 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-21-2012, 11:00 AM
  3. [SOLVED] Need to Convert Formula R1C1 into A1-style but the Formula String exceeds 255 characters
    By VBA_Gary in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-04-2012, 12:09 PM
  4. [SOLVED] R1C1 Formula help
    By aad401 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-25-2012, 08:45 PM
  5. Formula R1C1
    By SMILE in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-26-2010, 10:20 AM

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