+ Reply to Thread
Results 1 to 3 of 3

Is there a shorter, more elegant way of writing this? [long function]

  1. #1
    Registered User
    Join Date
    12-21-2011
    Location
    EU here and there
    MS-Off Ver
    Excel 2019
    Posts
    69

    Is there a shorter, more elegant way of writing this? [long function]

    =COUNTIFS(Today!F:F,VLOOKUP(I12,Data!B1:F23,4,FALSE),Today!AH:AH,TRUE,Today!Q:Q,"Resolved")+COUNTIFS(Today!F:F,VLOOKUP(I12,Data!B1:F23,4,FALSE),Today!AH:AH,TRUE,Today!Q:Q,"Closed")

    This is so long and ugly, but it was the only way I could get it working.
    Note the plus sign in the middle; I'm just repeating the whole thing again...

    I tried all sorts of syntax but could not get it working with the OR operator...

    :-) Hoping for some help!

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Is there a shorter, more elegant way of writing this? [long function]

    Try this version

    =SUM(COUNTIFS(Today!F:F,VLOOKUP(I12,Data!B1:F23,4,FALSE),Today!AH:AH,TRUE,Today!Q:Q,{"Resolved","Closed"}))
    Audere est facere

  3. #3
    Registered User
    Join Date
    12-21-2011
    Location
    EU here and there
    MS-Off Ver
    Excel 2019
    Posts
    69

    Re: Is there a shorter, more elegant way of writing this? [long function]

    That worked! :-)

+ 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. Replies: 5
    Last Post: 11-05-2014, 01:49 AM
  2. Replies: 1
    Last Post: 04-25-2013, 08:40 PM
  3. Long list of active x buttons shorter?
    By ikkuh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-08-2013, 06:10 AM
  4. [SOLVED] how to make a long line of VBA code shorter...
    By minifreak in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-11-2012, 12:02 PM
  5. Formula too long - Shorter version?
    By Blade2304 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-14-2006, 09:27 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