Results 1 to 11 of 11

Using variables in SumIf

Threaded View

  1. #1
    Registered User
    Join Date
    12-06-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    8

    Using variables in SumIf

    I am trying to put a SUMIF statementin VBA into a moving range of cells as the program cycles through. Therefor I need the criteria of the SUMIF formula to change as well. I want to put variables in for the range in the formula so as the variable lastRow increments, the range the formula searches also increments with that. Any suggestions?

    ie
    cells(lastRow,4).formula = "=sumif( b2:" & variable referencing another cell & "," & variable referencing text of a cell & ", c3:" & variable referencing another cell & ")"
    Last edited by ngoellner; 12-06-2010 at 01:56 PM.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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