Hello!
I’m trying to find a formula for an Excel 2010 workbook that will identify the number of unique ids in one column that meet a condition in a second column then returns a count of 1 in the cell for the first instance then 0 for each recurring instance. Ultimately the count columns will be used in a pivot table to summarize the results.
This sample chart shows a company code in column G and the negative number of days an invoice is due in column M.
In cell AC4 I’m using the formula =IF(SUMPRODUCT(($A$4:$A41=A41)*($G$4:$G41=G41))>1,0,1)which is copied down and works because the list only contains invoices <-1 days past due.
The formula in column AD needs to return 1 at the first invoice <-30 days then 0 for any recurring instance that meets that criteria. The formula in AE needs to return 1 at the first invoice <-90 days past due then 0 for any recurring instance that meets that criteria.
The values have been keyed in AD and AE just to demonstrate the desired result.
Thank you in advance for your help/advice!
[TABLE="width: 259"]
<tbody>[TR]
[TD="width: 22, bgcolor: transparent"][/TD]
[TD="width: 38, bgcolor: transparent"]A
[/TD]
[TD="width: 42, bgcolor: transparent"]G
[/TD]
[TD="width: 63, bgcolor: transparent"]M
[/TD]
[TD="width: 59, bgcolor: transparent"]AC
[/TD]
[TD="width: 64, bgcolor: transparent"]AD
[/TD]
[TD="width: 60, bgcolor: transparent"]AE
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]3
[/TD]
[TD="bgcolor: transparent"]State
[/TD]
[TD="width: 42, bgcolor: transparent"]Comp Code
[/TD]
[TD="width: 63, bgcolor: transparent"]Days Past Due
[/TD]
[TD="width: 59, bgcolor: transparent"]# of Comp 1+ Days PD
[/TD]
[TD="width: 64, bgcolor: transparent"]# of Comp 30+ Days PD
[/TD]
[TD="width: 60, bgcolor: transparent"]# of Comp 90+ Days PD
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]4
[/TD]
[TD="bgcolor: transparent"] CA
[/TD]
[TD="bgcolor: transparent, align: right"]545
[/TD]
[TD="bgcolor: transparent, align: right"]-7
[/TD]
[TD="bgcolor: transparent, align: right"]1
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]5
[/TD]
[TD="bgcolor: transparent"] CA
[/TD]
[TD="bgcolor: transparent, align: right"]545
[/TD]
[TD="bgcolor: transparent, align: right"]-15
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]6
[/TD]
[TD="bgcolor: transparent"] AZ
[/TD]
[TD="bgcolor: transparent, align: right"]842
[/TD]
[TD="bgcolor: transparent, align: right"]-35
[/TD]
[TD="bgcolor: transparent, align: right"]1
[/TD]
[TD="bgcolor: transparent, align: right"]1
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]7
[/TD]
[TD="bgcolor: transparent"] AZ
[/TD]
[TD="bgcolor: transparent, align: right"]842
[/TD]
[TD="bgcolor: transparent, align: right"]-95
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]8
[/TD]
[TD="bgcolor: transparent"] AZ
[/TD]
[TD="bgcolor: transparent, align: right"]842
[/TD]
[TD="bgcolor: transparent, align: right"]-105
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]9
[/TD]
[TD="bgcolor: transparent"]IL
[/TD]
[TD="bgcolor: transparent, align: right"]974
[/TD]
[TD="bgcolor: transparent, align: right"]-2
[/TD]
[TD="bgcolor: transparent, align: right"]1
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]10
[/TD]
[TD="bgcolor: transparent"]IL
[/TD]
[TD="bgcolor: transparent, align: right"]974
[/TD]
[TD="bgcolor: transparent, align: right"]-31
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]1
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]11
[/TD]
[TD="bgcolor: transparent"]IL
[/TD]
[TD="bgcolor: transparent, align: right"]974
[/TD]
[TD="bgcolor: transparent, align: right"]-60
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]12
[/TD]
[TD="bgcolor: transparent"]IL
[/TD]
[TD="bgcolor: transparent, align: right"]974
[/TD]
[TD="bgcolor: transparent, align: right"]-100
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]1
[/TD]
[/TR]
</tbody>[/TABLE]
I’m trying to find a formula for an Excel 2010 workbook that will identify the number of unique ids in one column that meet a condition in a second column then returns a count of 1 in the cell for the first instance then 0 for each recurring instance. Ultimately the count columns will be used in a pivot table to summarize the results.
This sample chart shows a company code in column G and the negative number of days an invoice is due in column M.
In cell AC4 I’m using the formula =IF(SUMPRODUCT(($A$4:$A41=A41)*($G$4:$G41=G41))>1,0,1)which is copied down and works because the list only contains invoices <-1 days past due.
The formula in column AD needs to return 1 at the first invoice <-30 days then 0 for any recurring instance that meets that criteria. The formula in AE needs to return 1 at the first invoice <-90 days past due then 0 for any recurring instance that meets that criteria.
The values have been keyed in AD and AE just to demonstrate the desired result.
Thank you in advance for your help/advice!
[TABLE="width: 259"]
<tbody>[TR]
[TD="width: 22, bgcolor: transparent"][/TD]
[TD="width: 38, bgcolor: transparent"]A
[/TD]
[TD="width: 42, bgcolor: transparent"]G
[/TD]
[TD="width: 63, bgcolor: transparent"]M
[/TD]
[TD="width: 59, bgcolor: transparent"]AC
[/TD]
[TD="width: 64, bgcolor: transparent"]AD
[/TD]
[TD="width: 60, bgcolor: transparent"]AE
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]3
[/TD]
[TD="bgcolor: transparent"]State
[/TD]
[TD="width: 42, bgcolor: transparent"]Comp Code
[/TD]
[TD="width: 63, bgcolor: transparent"]Days Past Due
[/TD]
[TD="width: 59, bgcolor: transparent"]# of Comp 1+ Days PD
[/TD]
[TD="width: 64, bgcolor: transparent"]# of Comp 30+ Days PD
[/TD]
[TD="width: 60, bgcolor: transparent"]# of Comp 90+ Days PD
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]4
[/TD]
[TD="bgcolor: transparent"] CA
[/TD]
[TD="bgcolor: transparent, align: right"]545
[/TD]
[TD="bgcolor: transparent, align: right"]-7
[/TD]
[TD="bgcolor: transparent, align: right"]1
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]5
[/TD]
[TD="bgcolor: transparent"] CA
[/TD]
[TD="bgcolor: transparent, align: right"]545
[/TD]
[TD="bgcolor: transparent, align: right"]-15
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]6
[/TD]
[TD="bgcolor: transparent"] AZ
[/TD]
[TD="bgcolor: transparent, align: right"]842
[/TD]
[TD="bgcolor: transparent, align: right"]-35
[/TD]
[TD="bgcolor: transparent, align: right"]1
[/TD]
[TD="bgcolor: transparent, align: right"]1
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]7
[/TD]
[TD="bgcolor: transparent"] AZ
[/TD]
[TD="bgcolor: transparent, align: right"]842
[/TD]
[TD="bgcolor: transparent, align: right"]-95
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]8
[/TD]
[TD="bgcolor: transparent"] AZ
[/TD]
[TD="bgcolor: transparent, align: right"]842
[/TD]
[TD="bgcolor: transparent, align: right"]-105
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]9
[/TD]
[TD="bgcolor: transparent"]IL
[/TD]
[TD="bgcolor: transparent, align: right"]974
[/TD]
[TD="bgcolor: transparent, align: right"]-2
[/TD]
[TD="bgcolor: transparent, align: right"]1
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]10
[/TD]
[TD="bgcolor: transparent"]IL
[/TD]
[TD="bgcolor: transparent, align: right"]974
[/TD]
[TD="bgcolor: transparent, align: right"]-31
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]1
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]11
[/TD]
[TD="bgcolor: transparent"]IL
[/TD]
[TD="bgcolor: transparent, align: right"]974
[/TD]
[TD="bgcolor: transparent, align: right"]-60
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]12
[/TD]
[TD="bgcolor: transparent"]IL
[/TD]
[TD="bgcolor: transparent, align: right"]974
[/TD]
[TD="bgcolor: transparent, align: right"]-100
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]1
[/TD]
[/TR]
</tbody>[/TABLE]