Excel formula Q so ...
 

  You don't need to be an 'investor' to invest in Singletrack: 6 days left: 95% of target - Find out more

[Closed] Excel formula Q so complicated I wouldn't know what to stick in Google

13 Posts
10 Users
0 Reactions
74 Views
Posts: 2295
Full Member
Topic starter
 

Okay Excel ninjas here goes:

What I'm trying to achieve is totalling all of the Completed Type As in cell D12 and Completed Type Bs in D13.

A bit of Googling has taken me to the COUNTIFS function but I'm not sure if its suitable for this particular conundrum.

Ta in advance.


 
Posted : 02/07/2021 4:04 pm
Posts: 265
Full Member
 

https://exceljet.net/formula/sum-entire-column

Would this work ?

Sorry, ignore didn't read it properly, will have a think


 
Posted : 02/07/2021 4:15 pm
Posts: 10761
Full Member
 

in D12 = SUMIF (D3:D9, ">0", B3:B9)


 
Posted : 02/07/2021 4:19 pm
 IHN
Posts: 19694
Full Member
 

*Edit - simplified it

Yeah, countifs will work for that

=COUNTIFS(b3:b9,1,D3:D9,">0")


 
Posted : 02/07/2021 4:23 pm
Posts: 9539
Free Member
 

I'm with t' purist on this: sumif.
How will countif work for the brace in C9?


 
Posted : 02/07/2021 4:30 pm
Posts: 265
Full Member
 

Type A Complete : =SUMIF(D3:D9,"<>",B3:B9)
Type B Complete : =SUMIF(D3:D9,"<>",C3:C9)


 
Posted : 02/07/2021 4:37 pm
Posts: 11961
Full Member
 


 
Posted : 02/07/2021 5:22 pm
Posts: 2295
Full Member
Topic starter
 

Cheers all. I'll give that a try on Monday.

(And yes, we are pretty much off of the right hand side of that graph up there ^^)


 
Posted : 03/07/2021 3:48 pm
Posts: 7812
Full Member
 

=SUM(IF(D3:D9>0,B3:B9,0)

Simple array formula.

That will go down column D and where the entry is greater than 0 (i.e. a date value is present) it will add in the corresponding B column value on the same line, if column D is blank/not greater than 0 then it will return a zero within the SUM.

You might need ctrl+shift+enter rather than just enter depending on your excel version.

SUMIF above is also good but I find this array format a bit more flexible (I think for example that SUMIF will only work vertically which is fine here but may not be on a different issue later).


 
Posted : 03/07/2021 10:33 pm
 Mat
Posts: 871
Full Member
 

I find sumproduct great for this sort of stuff…

In D12:

=SUMPRODUCT((D3:D9>0)*(B3:B9>0))

For d13 change b3:b9 to c3:c9

(I’ll mock it up in excel when I’m next on my pc to make sure I have the syntax right!)


 
Posted : 03/07/2021 11:11 pm
Posts: 1103
Free Member
 

Ditto the sumif answers as you're looking for the total if more than one criteria are met.


 
Posted : 03/07/2021 11:52 pm
Posts: 396
Free Member
 

Party pooper...prepared to be laughed at...but wouldn't it be easier just to have 2 columns for completion date..
One for type A next to type A count and one next to type B...looks to me that unless you are safely pulling the count data in then someone could enter Type A count and Type B count and a date that may apply to either all on the same line potential for the not unusual "I don't know it wasn't my spreadsheet but it told me to do it"


 
Posted : 04/07/2021 12:56 pm
Posts: 1103
Free Member
 

Two columns only would make sense then you could do something like COUNT and whatever the non blank formula is. You could VBA it to create a popup if someone enters dates in both cells by mistake.

Edit: COUNTA


 
Posted : 04/07/2021 1:01 pm
 Mat
Posts: 871
Full Member
 

Just checked the SUMPRODUCT solution I posted above, it should be...
=SUMPRODUCT((D3:D9>0)*B3:B9)
=SUMPRODUCT((D3:D9>0)*C3:C9)


 
Posted : 04/07/2021 4:09 pm

6 DAYS LEFT
We are currently at 95% of our target!