Forum Discussion

little2fern's avatar
little2fern
Brass Contributor
Apr 23, 2020
Solved

What formula to use for multiplying countifs result?

Here is my current formula of C6. I need a new formula for C6 and my goal here is to

- find out how many time 'AED' in cell B6 appears (in spreadsheet 'query result') within the selected dates of cell B2 and B3

- also after finding out how many times AED appears, I need to multiply the count by the number appear in E column called NUM_OF_TXN (in spreadsheet 'query result').

 

Attachment 1: where new formula in C6 needs to be

 

Attachment 2: source the formula refers to spreadsheet called, 'query result'.

9 Replies

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    little2fern 

    I guess the first part with COUNTIFS works. To find the number form column E you may use INDEX/MATCH assuming first found number for given date range will be taken (if it could be few of them). Formula could be like

    =IFNA(INDEX(
      <Target Column E>, 
      MATCH(1, INDEX(
         (<Dates Column> >= <Start Date>)*
         (<Dates Column> <= <End Date>)*
         (<Currency Column> = <Currency Code>),0),
      0)),0)
    
    

    We return zero if nothing was found.

    • little2fern's avatar
      little2fern
      Brass Contributor

      SergeiBaklan 

       

      <Target Column E> means NUM_OF_TXN in column E of spreadsheet query result
      
      <Currency Column> means TXN Currency in column B
      
      <Currency Code> means TXN_CUR in column D of spreadsheet query result

       

      Correct?

Resources