Excel Formula help to count rows once a value occurs but not when a second value occurs

deharris

New Member
Joined
Dec 15, 2017
Messages
19
I could use a hand here on what I think is a sumproduct need. I have a table where I'm only interested in counting the row when a value occurs for the first time. See the top row of the picture here for the formula solution needed. The end goal is to get a running total of the number or rows that has a value each day but only until the first value occurs. Once that first value occurs, there's no need to add additional values. I appreciate any help.
thank you

picture link
Picture2.jpg
Picture2.jpg
https://www.dropbox.com/s/0x57jnfsmias4vg/Picture2.jpg?dl=0
 
Last edited:

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Thank you for the reply. Each of the formulas only returns a 1 at the top of the column where an entry is recorded after a blank column. I'm looking to capture the total new/unique/first time entries in that column moving left to right on the example I shared.
thank you again,
 
Upvote 0
This?


Excel 2010
ABCDEFGHIJKLMN
11/1/20181/2/20181/3/20181/4/20181/5/20181/6/20181/7/20181/8/20181/9/20181/10/20181/11/20181/12/2018
2Customer 1881
3Customer 2331
4Customer 30
5Customer 41020202
Sheet1
Cell Formulas
RangeFormula
N2=SUMPRODUCT(($B2:$M2<>"")/COUNTIF($B2:$M2,$B2:$M2&""))
 
Upvote 0
The formula provided appears to show me the number of unique occurrences in each row, not the top row of the photo link provided for the number of first time occurrences each day by row (customer). In the photo link, I'm trying to solve for the top row and the duplicate entries (highlighted in yellow and regardless of value) wouldn't be counted by the formula. Your Sumproduct is close and is actually a huge help for me on another project so thank you!
 
Upvote 0
I'm trying to solve for the top row and the duplicate entries (highlighted in yellow and regardless of value) wouldn't be counted by the formula.

I wouldn't just write a formula for this, instead unpivot the data with

https://www.youtube.com/watch?v=xmqTN0X-AgY

then add a column with this formula: =IF(C2="",0,IF(COUNTIFS($A$2:A2,A2,$C$2:C2,">0")=1,1,0))

and set two pivot tables one above the other:

9Bb9eZW.png
 
Upvote 0
A helper column will also work with the original format if you must keep it:


Excel 2010
ABCDEFGHIJKLMN
1013580121241
21/1/20181/2/20181/3/20181/4/20181/5/20181/6/20181/7/20181/8/20181/9/20181/10/20181/11/20181/12/2018
3Customer 18.008.008
4Customer 23.003.005
5Customer 30
6Customer 410.0020.0020.005
7Customer 514.0011
8Customer 614.0014.007
9Customer 721.005
10Customer 82.006.005
11Customer 99.009.003
12Customer 1032.0011
13Customer 1110.0010
14Customer 122.004
15Customer 133.003.003
16Customer 140
17Customer 1516.0027.009
18Customer 164.004.004
19Customer 173.0011
20Customer 183.0010
21Customer 1912.003.004
22Customer 203.004
23Customer 212.508
24Customer 222.002.005
25Customer 232.502.504
26Customer 242.005
27Customer 252.002
28Customer 263.002.505
29Customer 2712.0012.005
30Customer 283.0011
31Customer 293.0012
32Customer 301.002.003
Sheet1 (2)
Cell Formulas
RangeFormula
B1=COUNTIF($N$3:$N$32,COLUMN()-1)
N3{=IFERROR(MATCH(TRUE,$B3:$M3<>"",0),0)}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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