+ Reply to Thread
Results 1 to 4 of 4

Shorten This Formula

  1. #1
    Forum Contributor
    Join Date
    06-28-2010
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    101

    Shorten This Formula

    Hello,

    I have many number values in different non-contiguous cells, I have to count the cells having value >1 only.

    As the cells are not adjacent, the regular formula does not work.

    I tried the following and got the desired result :

    =(COUNTIF(A4,">1")+COUNTIF(C4,">1")+COUNTIF(E4,">1")+COUNTIF(H4,">1")+COUNTIF(I4,">1")+COUNTIF(K4,">1")+COUNTIF(M4,">1")+COUNTIF(N4,">1")+COUNTIF(O4,">1"))

    But By this way, Every time I will need to enter this big formula.

    Is there any way to Shorten this formula? or Can you suggest any other solution?

    Basically My Query is :

    A1 : 3
    B1 : 0
    C1 : 1
    d1 : 2
    e1 : 0
    f1 : 5
    I have to count the cells having value ">1", i.g. (in current case) countif(A1, D1, f1,">1")

    Please Suggest.
    Last edited by excelforum123; 10-12-2010 at 05:08 AM. Reason: Issue Solved.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Shorten This Formula

    You could use:

    Please Login or Register  to view this content.
    ie use contiguous ranges where you can

    If on the other hand there are "flags" denoting the coumns to use in another row - eg A1,C1 etc contain "x" then

    Please Login or Register  to view this content.
    Last edited by DonkeyOte; 10-12-2010 at 04:51 AM.

  3. #3
    Forum Contributor
    Join Date
    06-28-2010
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    101

    Re: Shorten This Formula

    Thanks, It worked !!.

    Although I don't have any continues cells, I done some changes and I figured it out.

    Thanks again.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Shorten This Formula

    OK - FWIW another (Volatile) alternative would be:

    Please Login or Register  to view this content.

+ 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