If Statement + Is Number + CountA

Datatellsall2

New Member
Joined
Jul 17, 2018
Messages
23
Hello-

I have the following data set, which I'm trying to calculate the time spent based on =CountA of the items (columns A-E below).

[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"]Col. A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[TD="align: center"]G[/TD]
[TD="align: center"]H[/TD]
[TD="align: center"]I[/TD]
[/TR]
[TR]
[TD]Item 1[/TD]
[TD]Item 2[/TD]
[TD]Item 3[/TD]
[TD]Item 4[/TD]
[TD]Item 5[/TD]
[TD]Total Time Spent (mins.)[/TD]
[TD]Time Spent - Item 1[/TD]
[TD]Time Spent - Item 2[/TD]
[TD]Time Spent - Item 3[/TD]
[/TR]
[TR]
[TD]100,000[/TD]
[TD]50,000[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]15[/TD]
[TD]7.5[/TD]
[TD]7.5[/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]

I'm trying to calculate columns G, H, and I. Column F time should be split evenly if there is values in columns A-E.

Right now my formula is =IF(A2=ISNUMBER(A2),F2/COUNTA($B2:$B26,0) but gives me the wrong output.

Really would appreciate any help where possible.

Thanks,
M
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Hi,

see if this helps:


Book1
ABCDEFGHI
1Item 1Item 2Item 3Item 4Item 5Total Time Spent (mins.)Time Spent - Item 1Time Spent - Item 2Time Spent - Item 3
210050000157,57,50
Sheet1
Cell Formulas
RangeFormula
G2=IF(A2>0,$F2/COUNTIF($A2:$E2,">0"),0)
H2=IF(B2>0,$F2/COUNTIF($A2:$E2,">0"),0)
I2=IF(C2>0,$F2/COUNTIF($A2:$E2,">0"),0)
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top