Results 1 to 24 of 24

VBA sumif How can i indicate range?

Threaded View

  1. #1
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Azerbaijan
    MS-Off Ver
    Excel 2016
    Posts
    145

    VBA sumif How can i indicate range?

    Hey Dear community,

    I use this code

    Sub Macro1()
    '
    Set MyRg1 = Range("C5:C314055")
    Set MyRg2 = Range("E5:E314055")
    Cells(1, "L") = WorksheetFunction.SumIf(MyRg1, "MARKET", MyRg2)
    '
    End Sub
    But instead of "MARKET" i need to use range from sheet2 A2:A35 how can i do that?
    Last edited by jeffreybrown; 12-09-2018 at 10:45 AM. Reason: Please use code tags!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Sumif if range does not equal any text in a range
    By Luigi802 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 12-20-2019, 09:12 AM
  2. [SOLVED] SUMIF formula with dynamic column range and then expand the width of SUM range
    By gravythief in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-26-2017, 08:36 AM
  3. Subtracting from the SUMIF with the difference from the SUMIF range
    By iamblue91 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-04-2014, 09:01 PM
  4. [SOLVED] Shorten SUMIF + SUMIF + SUMIF each with same reference range but different criteria???
    By HeyInKy in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-13-2014, 09:25 PM
  5. [SOLVED] Countif / Sumif Range in a 24 Hour Time Range
    By cwwazy in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-16-2013, 04:18 PM
  6. SUMIF Cells in range if values in another range is
    By ChrisNor in forum Excel General
    Replies: 1
    Last Post: 10-08-2009, 11:54 AM
  7. Replies: 2
    Last Post: 01-11-2005, 07:06 PM

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