Results 1 to 13 of 13

SUMPRODUCT last Column

Threaded View

  1. #1
    Forum Contributor
    Join Date
    11-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    391

    SUMPRODUCT last Column

    Hi All,

    I am using sumproducts in VBA and I have below code:

    Dim i As Integer
    
    lc = Sheets("sheet2").Cells(3, Columns.Count).End(xlToLeft).Column
    AIlc = Sheets("AI").Cells(2, Columns.Count).End(xlToLeft).Column
    
    For i = 1 To 12
    
    Cells(2 + i, lc + 1) = Application.Evaluate("SUMPRODUCT((MONTH(AI!$B$2:$B$366)=" & i & ")*(AI!$AY$2:$AY$366))")
    
    Next i
    instead of AI!$AY$2:$AY$366 in above code I want to refer to the last column of sheet AI. How can I change that in above code?

    Thanks,
    Last edited by hanif; 07-22-2016 at 06:54 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Sumproduct and Countif in column A and need to sum quantity in column F
    By drewship in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-28-2016, 03:54 PM
  2. Sumproduct within same column
    By lisla in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-22-2015, 02:58 AM
  3. Sumproduct of column based on text search of neighbouring column
    By anthropormorph in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-01-2015, 10:51 AM
  4. [SOLVED] Sumproduct & Column
    By penexcel in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-23-2014, 02:18 PM
  5. [SOLVED] SUMPRODUCT IF COLUMN B=x AND COLUMN E CONTAINED IN A LIST
    By AL1976 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-17-2014, 10:35 AM
  6. SUMPRODUCT - Every other column
    By Jabba in forum Excel General
    Replies: 6
    Last Post: 03-23-2009, 11:56 AM
  7. SUMPRODUCT - If column 'X' Does not contain
    By Badvgood in forum Excel General
    Replies: 1
    Last Post: 02-12-2007, 08:28 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