# Count IF returning spill

1. ## Count IF returning spill

Hi Community

I been trying for 2 days this formula but always return SPILL

I need the graph on the tab 'KPI' get the number from the other 2 tables automatically.

pex. on 'KPI' D21 - I need the total numbers of orders with "Schedule date" for 21/04 summing the one on "Schedule" and "Despatched" table.

ps: We use the table schedule and after the order is done we move to despatched.

The logic that I'm using to get the data on "Despatched" table

KPI!B24 - count dates from the colum 'Despatched'!G6:G50 that are equal to KPI!B23 "=COUNTIF(Despatched!G6:G50,B23)"

but I still need to SUM with the orders from the "Schedule" table

The logic that I'm thinking to get the ones that are still on Schedule table is

"Find on the columm Schedule!B6:B50 the orders that have the schedule date (Schedule!A6:A50) for 21/04 and count them and sum"

WORNG FORMULA USED =COUNTIF('Despatched!\$G\$6:\$G\$50,B23)+IF('Schedule 2020'!\$A\$6:\$A\$50='KPI - Order on time'!B23,COUNTIF('Schedule 2020'!\$B\$6:\$B\$50,B23))

To orders finished on time (KPI!A25) I need to compare on Despatched table the Schedule date and the Despatched date and sum, which I think with the help above I translate to this situation.

If you have any other logic that I can use here to sum these number would be very helpful as well.

Thank you all.

2. ## Re: Count IF returning spill

I suggest you read up on the functions COUNTIFS() and SUMIFS()

3. ## Re: Count IF returning spill

the closest that I get was summing the numbers on collumm B using:

=SUMIFS(\$B\$6:\$B\$49,\$G\$6:\$G\$49,\$A\$44)

but I need the formula count the cells instead

Count the cells \$B\$6:\$B\$49 when \$G\$6:\$G\$49 is equal to \$A\$44.

I dont know how to do this using counting

Also tried the below with no success
=IF(\$G\$6:\$G\$49=\$A\$44, COUNT(\$B\$6:\$B\$49))

There are currently 1 users browsing this thread. (0 members and 1 guests)