Count Only Fields That Are Greater Than 0

jski21

Board Regular
Joined
Jan 2, 2019
Messages
133
Office Version
  1. 2016
Platform
  1. Windows
Good afternoon Mr. Excel Team,

I have the following data:

B&H Board-Up Disbursements PY48 2022-2023.xlsx
GHIJKL
1Request No.PeriodAmount# of Services
21Jun-2229,420.0057
32Jul-22--
43Aug-22--
54Sep-2250,564.50127
65Oct-2270,695.50204
76Nov-22134,494.001,193
87Dec-22  
9Request No.68Jan-23  
109Feb-23  
11Date8/31/202310Mar-23  
1211Apr-23  
13Reporting PeriodNov-2212May-23  
1413FINAL  
Cover Sheet
Cell Formulas
RangeFormula
J2:J14J2='Equipment & Contractual'!I2
K2:L14K2=IF('Equipment & Contractual'!J2<>"",'Equipment & Contractual'!J2,"")
H9H9=IF(INDEX(K2:K13,COUNT(K2:K13))<>"",OFFSET(INDEX(K2:K13,COUNT(K2:K13)),0,-2))


Data is essentially payments submitted. Cell H9 calculates the payment number using the formula:

=IF(INDEX(K2:K13,COUNT(K2:K13))<>"",OFFSET(INDEX(K2:K13,COUNT(K2:K13)),0,-2))


Sometimes there is no payment. In that case, I don't want to count it as nothing will be submitted. This is really payment #4 not #6. How can this formula be adjusted to do that or perhaps there is a better way?

Thanks as always for the consideration and guidance.

jski
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Good afternoon Mr. Excel Team,

I have the following data:

B&H Board-Up Disbursements PY48 2022-2023.xlsx
GHIJKL
1Request No.PeriodAmount# of Services
21Jun-2229,420.0057
32Jul-22--
43Aug-22--
54Sep-2250,564.50127
65Oct-2270,695.50204
76Nov-22134,494.001,193
87Dec-22  
9Request No.68Jan-23  
109Feb-23  
11Date8/31/202310Mar-23  
1211Apr-23  
13Reporting PeriodNov-2212May-23  
1413FINAL  
Cover Sheet
Cell Formulas
RangeFormula
J2:J14J2='Equipment & Contractual'!I2
K2:L14K2=IF('Equipment & Contractual'!J2<>"",'Equipment & Contractual'!J2,"")
H9H9=IF(INDEX(K2:K13,COUNT(K2:K13))<>"",OFFSET(INDEX(K2:K13,COUNT(K2:K13)),0,-2))


Data is essentially payments submitted. Cell H9 calculates the payment number using the formula:

=IF(INDEX(K2:K13,COUNT(K2:K13))<>"",OFFSET(INDEX(K2:K13,COUNT(K2:K13)),0,-2))


Sometimes there is no payment. In that case, I don't want to count it as nothing will be submitted. This is really payment #4 not #6. How can this formula be adjusted to do that or perhaps there is a better way?

Thanks as always for the consideration and guidance.

jski


A brief walk to the men's room brought forth an epiphany. Will use this: =COUNTIF(K2:K14,">0").

And then to add the numbers in column K based on the result in H9: =SUMIF(J2:J14,"<"&EOMONTH(H13,-1)+1,K2:K14)
 
Upvote 0

Forum statistics

Threads
1,215,089
Messages
6,123,058
Members
449,091
Latest member
ikke

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