+ Reply to Thread
Results 1 to 5 of 5

a more concise formula

  1. #1
    Registered User
    Join Date
    07-16-2007
    Location
    San Francisco, CA
    MS-Off Ver
    2010
    Posts
    93

    a more concise formula

    Can anyone help to make this formula more concise and shorter, it was design to check a numbers in a range to see if any of them falls into a particular range.

    =IF(SUM((COUNTIF(Fund,">11999")-(COUNTIF(Fund,">12999"))),(COUNTIF(Fund,">21099")-(COUNTIF(Fund,">28729"))),(COUNTIF(Fund,">28730")-(COUNTIF(Fund,">33999"))),(COUNTIF(Fund,">58999")-(COUNTIF(Fund,">59999"))),(COUNTIF(Fund,">82000")-(COUNTIF(Fund,">84999"))),(COUNTIF(FUND1,">11999")-(COUNTIF(FUND1,">12999"))),(COUNTIF(FUND1,">21099")-(COUNTIF(FUND1,">28729"))),(COUNTIF(FUND1,">28730")-(COUNTIF(FUND1,">33999"))),(COUNTIF(FUND1,">58999")-(COUNTIF(FUND1,">59999"))),(COUNTIF(FUND1,">82000")-(COUNTIF(FUND1,">84999"))))>0,"ATTACHMENT E IS REQUIRED","")

    and if the any of the number fall into the range it will print the message, "Attachment is Required"

    Thanks James
    Last edited by jwongsf; 01-15-2009 at 10:44 AM. Reason: solved

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492
    DCOUNT might help, look into it, or post your book up so we can see.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Try...

    =SUM((COUNTIF(Fund,">"&{11999,21099,28730,58999,82000})-COUNTIF(Fund,">"&{12999,28729,33999,59999,84999}))+(COUNTIF(Fund1,">"&{11999,21099,28730,58999,82000})-COUNTIF(Fund1,">"&{12999,28729,33999,59999,84999})))

    Assuming that Fund refers to A2:A10, and Fund1 refers to C2:C10, here's another way...

    =SUM(COUNTIF(OFFSET(Fund,,{0,2},,1),">"&{11999;21099;28730;58999;82000})-COUNTIF(OFFSET(Fund,,{0,2},,1),">"&{12999;28729;33999;59999;84999}))

    Note, however, OFFSET is a volatile function.

    Hope this helps!

  4. #4
    Registered User
    Join Date
    07-16-2007
    Location
    San Francisco, CA
    MS-Off Ver
    2010
    Posts
    93
    Thank you thank you, it works just great

  5. #5
    Registered User
    Join Date
    07-16-2007
    Location
    San Francisco, CA
    MS-Off Ver
    2010
    Posts
    93

    solved

    Thank you once again it works like a charm.
    James

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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