•1 min read•from Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community
Help counting number of columns containing values greater than zero
Our take
Are you grappling with how to count columns with values greater than zero in your spreadsheet? You're not alone—many users encounter challenges when trying to tally distinct columns based on specific conditions. In your case, you want to ensure that each column is counted only once, regardless of how many non-zero values it contains. This introduction will guide you through a straightforward formula that addresses your needs, empowering you to efficiently analyze your data without the frustration of complex calculations. Let’s dive in!
Hello!
I have a table where I'm trying to count the number of columns containing values greater than zero, but only counting once per column and I'm struggling with the formula.
The cells D12:O12 could potentially contain any value from zero or above. If only D12 contained a value this would count as 1, if D12 and E12 contained values this would count as 2, and if D12, D13 and E12 contained values this would also count as 2 as I'm only interested if the column contains data or not.
Any help anyone can provide would be greatly appreciated!
[link] [comments]
Read on the original site
Open the publisher's page for the full experience
Related Articles
- How to count how many columns two rows have in commonHello, I'm a hobbyist driving myself insane hopping between index, lookups, and countif functions trying to count: How many times does character A feature with character B across multiple events https://preview.redd.it/t8o8z6aw9jqg1.png?width=794&format=png&auto=webp&s=dde6e6153db1ac208900bb0f3b9c6a4e5ca4430f This is a slice of the whole chart, I'll call the characters A-D in descending order. For example, say I want to count how many times character A and D share a column. In this slice of the chart, I'd want for the function to return 1. In total there are 32 columns, and I want to be able to compare one character row with 21 other rows. I suspect I'll need to change the cells that read "1*" to simplify the matter, but if there's a way to count for both "1" and "1*" cells I'd be very thankful. submitted by /u/Melozules [link] [comments]
- Counting longest spurt of consecutive cells with valueHey y’all! In my data I have a row for every 6 hours for 12 months and a column with varying values for each row. Like, A B 1/1/2026 0:00 -9.76 1/1/2026 6:00 -12.54 etc. I need to count what was the longest length of time the values were above -12 for the entire year. Any ideas on how to do this? I’m open to any solutions be it formulas, power query, or macros/VBA. I’m on 365 on a desktop. I’m currently cleaning up a bunch of data sheets other people made and this is a task we have to do frequently. In this workbook I’ll have to do it on 20+ columns and then do it again on each column for subsets of the time we have data for. Their current solution is a C column with =IF(B2>=-12,C2+.25,0) to count the days >-12 in a row in 6 hour increments. Then in column D they have =IF(C3>C2+C4,C3,0) to have a column with just the max value of each consecutive spurt of time. At the end they run =MAX(D2:D1459) to get the longest spurt. Then they add 2 more columns for each subset of time they want to look at. It takes up half the workbook. submitted by /u/CompetitiveDuck495 [link] [comments]
- Is there a way to Sumifs up to a certain column with multiple criteria?Hi everyone, I’m looking for a formula to sum all of the columns starting from a particular column up to a particular column. How do I best do that? On the data tab, Row 1 I have the following columns: A1 = date B1 = serial number C1 = customer name D1 = date 1, with the data being $ E1 = date 2, with the data being $ F1 = date 3, with the data being $ In a separate tab I have the same thing mirroring the data tab, but without the $, for the calculation what I intend to do is on E2, I want to say if $A2 = E$ 1, then sum all of D up to E column on the data tab provided that the value on B column of the data tab match B2 of the calc tab, and C column of the data tab match C2 of the calc tab. For F2, it would be the same thing, but sum column D up to column F instead of column E. I hope it makes sense. Thanks for your help! submitted by /u/botng [link] [comments]