+ Reply to Thread
Results 1 to 4 of 4

Error in Excel VBA code using SumIfs/Index/Match

  1. #1
    Registered User
    Join Date
    08-14-2019
    Location
    Ohio
    MS-Off Ver
    2013
    Posts
    2

    Error in Excel VBA code using SumIfs/Index/Match

    I originally posted my code stating I couldn't figure out why I was getting an error. Since then I think I was able to trace it specifically to the fact that multiple columns are being used to look up the proper date and use that column as as the criteria range. I would really appreciate any help anyone can give.


    If I replace the Indexing variable with one exact column to use as the Range (WSRev.Range("$AK:$AK")) then the RegionFcstAmt1 works fine and returns the correct value. Below works.
    Please Login or Register  to view this content.
    However, I need the formula to look up the correct column based on the date and use that as the criteria range. If I use the Sheets Range with more than one column it doesn't work either. Below does not work.
    Please Login or Register  to view this content.
    And I'm trying to use the Index/Match but that is not working either.
    Please Login or Register  to view this content.

    Please Login or Register  to view this content.
    Last edited by HelpPlease715; 08-14-2019 at 11:48 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Error in Excel VBA code using SumIfs/Index/Match

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. As you are new here, I shall do it for you this time.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    08-14-2019
    Location
    Ohio
    MS-Off Ver
    2013
    Posts
    2

    Re: Error in Excel VBA code using SumIfs/Index/Match

    Thank you very much. I apologize.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Error in Excel VBA code using SumIfs/Index/Match

    You had tried, but all you had done was type # at either end of the code! Better to select the text that is code and then click on the # symbol on the toolbar.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] SUMIFS with INDEX MATCH causing #REF Error
    By admirable in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-18-2018, 02:06 PM
  2. VBA Code for Index/Match/Match to input into excel based on 2 criteria inside form
    By Carl Fisher in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-22-2017, 12:11 PM
  3. SUMIFS and INDEX MATCH #VALUE error
    By rpconcannnon in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-01-2015, 01:15 PM
  4. [SOLVED] Match & Index code results in Runtime error 1004
    By DJvdW in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-27-2013, 03:52 AM
  5. [SOLVED] Excel - INDEX, MATCH, SUMIFS?! TIME & ATTENDANCE REPORT
    By ccernat in forum Excel General
    Replies: 12
    Last Post: 08-20-2013, 04:57 AM
  6. Replies: 3
    Last Post: 05-02-2013, 01:31 AM
  7. SUMIFS,INDEX,MATCH code problems
    By sofib09 in forum Excel General
    Replies: 10
    Last Post: 01-07-2011, 04:37 PM

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