+ Reply to Thread
Results 1 to 3 of 3

Combining COUNTIF statements with different criteria

  1. #1
    Registered User
    Join Date
    03-09-2007
    Posts
    51
    I'm new to the forum and reletively new to Excel, but what I need to know is how to combine COUNTIF functions with different criteria.

    e.g. I want to count the number of invoices paid by either switch or Maestro and display the total as one figure.

    I have a data range which is in cells I17:I1273 and within this range are the varying forms of payment options written out i.e. Visa, Mastercard, Switch, Maestro etc.

    Any help on this would be very much appreciated because I am stuck!

    I have managed to count the number of sales containing the other criteria using the following formula as an example;

    =COUNTIF(I17:I1273,"VISA")

    I just don't know how to combine the criteria within the same statement.

    Thanks in advance.

    Darlo

    Fantastic, it worked. New to the forum but I will definately be back.

    Only recently started learning Excel in depth so am a novice to it.

    Thanks again.

    Darlo

    Basically I'm trying to find out the total of invoices which are paid by creditcard on a monthly basis.

    For example; I have a data range E16:E40 which contains the invoice totals, and I have column 'G' which tells me how the invoice was paid, mastercard, cash, cheque etc.

    What I need to do is create a formula which will add together invoice amounts only if the word 'mastercard', 'visa', 'switch' or 'maestro' are displayed in column 'G' - therefore ignoring invoice totals which are paid by another means.

    Any help would be appreciated.
    Last edited by VBA Noob; 03-11-2007 at 10:07 AM.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    Try

    =SUMPRODUCT(--(I17:I1273={"VISA","Mastercard","Switch","Maestro"}))

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    You could also use COUNTIF like this

    =SUM(COUNTIF(I17:I1273,{"Switch","Maestro"}))

+ 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