Jun 26 2021 07:47 AM
Hi use the following formula to sum Purchase Orders in my file. I would like to add in and if or if and or some other part so that the formula will also count by location which is in column C.
There are various sites so maybe every time the site name changes then count the number of sites?
=sum(1/(countif(a3069:a6059,a3069:a60529)))}
Many thanks
Ann
Jun 26 2021 06:09 PM - edited Jun 26 2021 06:15 PM
Hi @anncshaw,
You provided:
Hi use the following formula to sum Purchase Orders in my file.
Does the sum involve the number of how many Purchase Orders you have, or the sum of the Purchase Order amounts?
I would like to add in and if or if and or some other part so that the formula will also count by location which is in column C.
How many locations? and what are they? Cities? States? Regions?
There are various sites so maybe every time the site name changes then count the number of sites?
Are these sites locations? or websites?
=sum(1/(countif(a3069:a6059,a3069:a60529)))}
In the sum function you are using, what does the 1 represent?
In the countif function you are using, what is the criterion/criteria?
Return value
A number representing cells counted.
Syntax
=COUNTIF (range, criteria)
Arguments
range - The range of cells to count.
criteria - The criteria that controls which cells should be counted.
example: =COUNTIF(a3069:a6059,"New York")
Your narrative is somewhat ambiguous and cryptic. Can you please elaborate? or maybe share an anonymized (no private info) version of your workbook, because that would be helpful to us and be able to help you with a solution.
cheers
Jun 28 2021 03:39 AM
Hi@Yea_So
The formula is as follows:
{=SUM(1/(COUNTIF(A2:A121,A2:A121)))}
This counts the number of POs for year 2016 then in the next row the same formula but different range to count the number of POs for year 2017 etc
{=SUM(1/(COUNTIF(A122:A1233,A122:A1233)))}
{=SUM(1/(COUNTIF(A1234:A3068,A1234:A3068)))}
34 | 2016 EES PO's |
357 | 2017 EES PO's |
512 | 2018 EES PO's |
958 | 2019 EES PO's |
1392 | 2020 EES PO's |
664 | 2021 EES PO's |
First column contains that formula for the count.
The sites refer to Departments and there are two but I need to include them in my formula to include the count if the site is one department and then if it is the other department. These are in column C in my sheet with the following data:
ALEXIS FARMA INT |
ALEXIS DUBLIN |
ALEXIS FARMA INT |
ALEXIS DUBLIN |
ALEXIS FARMA INT |
ALEXIS DUBLIN |
So I need the count included for each of these departments.
I hope this makes sense.
Many thanks
Ann
Jun 28 2021 04:13 AM
You may check
Excel formula: Count unique values with criteria | Exceljet
Excel formula: Count unique text values with criteria | Exceljet
depends on which Excel version do you have.
Jun 28 2021 04:18 AM
Jun 28 2021 04:29 AM
Jun 28 2021 04:30 AM
Jun 28 2021 10:17 AM