Posts

Showing posts from August, 2024

SCAN function

Image
  SCAN function Excel for Microsoft 365   Excel for Microsoft 365 for Mac   Excel for the web Here's your free trial of Copilot Pro Unlock now Scans an array by applying a  LAMBDA  to each value and returns an array that has each intermediate value.   Syntax =SCAN ([initial_value], array, lambda(accumulator, value, body)) The SCAN function syntax has the following arguments and parameters: [initial_value]       Sets the starting value for the accumulator. array       An array to be scanned. lambda       A LAMBDA that is called to reduce the array. The LAMBDA takes three parameters: accumulator     The value totaled up and returned as the final result. value      The current value from the array. body      The calculation applied to each element in the array. Remarks Use the initial_value argument to set the starting value for the accumulator parameter. If you are working with text, set the initial value to "". Errors Providing an invalid LAMBDA function or an incorrect nu

COUNTIFS function

  COUNTIFS function The  COUNTIFS  function applies criteria to cells across multiple ranges and counts the number of times all criteria are met. This video is part of a training course called  Advanced IF functions . Syntax COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2]…) The COUNTIFS function syntax has the following arguments: criteria_range1     Required. The first range in which to evaluate the associated criteria. criteria1     Required. The criteria in the form of a number, expression, cell reference, or text that define which cells will be counted. For example, criteria can be expressed as 32, ">32", B4, "apples", or "32". criteria_range2, criteria2, ...     Optional. Additional ranges and their associated criteria. Up to 127 range/criteria pairs are allowed. Important:  Each additional range must have the same number of rows and columns as the  criteria_range1  argument. The ranges do not have to be adjacent to each other. Re

COUNTIF function

  COUNTIF function Use COUNTIF, one of the  statistical functions , to count the number of cells that meet a criterion; for example, to count the number of times a particular city appears in a customer list. In its simplest form, COUNTIF says: =COUNTIF(Where do you want to look?, What do you want to look for?) For example: =COUNTIF(A2:A5,"London") =COUNTIF(A2:A5,A4) Syntax Examples To use these examples in Excel, copy the data in the table below, and paste it in cell A1 of a new worksheet. Data Data apples 32 oranges 54 peaches 75 apples 86 Formula Description =COUNTIF(A2:A5,"apples") Counts the number of cells with apples in cells A2 through A5. The result is 2. =COUNTIF(A2:A5,A4) Counts the number of cells with peaches (the value in A4) in cells A2 through A5. The result is 1. =COUNTIF(A2:A5,A2)+COUNTIF(A2:A5,A3) Counts the number of apples (the value in A2), and oranges (the value in A3) in cells A2 through A5. The result is 3. This formula uses COUNTIF twice to

SUMIF function

  SUMIF function You use the  SUMIF  function to sum the values in a range that meet criteria that you specify. For example, suppose that in a column that contains numbers, you want to sum only the values that are larger than 5. You can use the following formula:  =SUMIF(B2:B25,">5") This video is part of a training course called  Add numbers in Excel . Tips:  If you want, you can apply the criteria to one range and sum the corresponding values in a different range. For example, the formula  =SUMIF(B2:B5, "John", C2:C5)  sums only the values in the range C2:C5, where the corresponding cells in the range B2:B5 equal "John." To sum cells based on multiple criteria, see  SUMIFS function . Important:  The SUMIF function returns incorrect results when you use it to match strings longer than 255 characters or to the string  #VALUE! . Syntax SUMIF(range, criteria, [sum_range]) The  SUMIF  function syntax has the following arguments: range    Required. The rang