COUNT / INDEX Aging Number Column Data

ChrisOK

Well-known Member
Joined
Mar 26, 2003
Messages
601
I'm trying to create a quick AGING table....
On Sheet 1 the log of items exists..
On Sheet 2 - the Aging Info exists....

I'd like to have Sheet 2 look at Sheet 1 and count up how many items in column G are beyond the 14 day range.... > than 14

I need another cell to count up how many in Col G fall between 15 and 30 days.... =>15 and =<30

I need another cell to count up how many in Col G are =14 days old or BELOW =<14

I figured plugging in a conditional formating function might be the best way to do it -- but then thought that just entering an INDEX / LOOKUP / COUNTIF function on Sheet 2 might work better.....

Thanks in advance for your help to determine the best way...
PS - Column G is ever-growing in rows...
It'd need to look at G:G
Book2
ABCDEFGHI
1LOG#PartNumberAnalystDateReleasedDate Signed-offDateReturnedDaysOpenActualCycleTime
21000XXJones10/20/200310/20/200310/22/20031202>14days
31000YYHawes10/21/200310/21/200310/22/20031191>14days
41000ZZHawes10/22/200310/25/200310/22/20031180>14days
51001SSSmith11/15/200311/30/200311/30/20039415>14days
61001WWJones1/1/20041/15/2004470>14days
71002DDHawes1/31/20042/5/200417015-30days
81002FFHawes2/1/200416015-30days
91003GGSmith2/7/2004100<14days
101003UUJones2/13/200440<14days
111004LLLHawes2/14/200430<14days
121004JJJHawes2/15/200420<14days
131005AAASmith2/17/200400<14days
Sheet1
 
G1:G65535 ... is a very expensive way. I'll leave it to Aladin to get you to a dynamic range, if you still want SUMPRODUCT...
 
Upvote 0

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
ChrisOK said:
but you said:

"It is not allowed to use whole columns like G:G with SumProduct."

and I need the function to look at everything in Col G of Sheet 1 as they add new rows of data to count....

If I put a limitation of G2:G:500 then it will stop calculating properly at 500 ( as they'll have no idea how to re-build it to pick up 501 down.... )

If SUMPRODUCT can't utilize g:g -- what can?

Two options:

In L2 enter & copy down:

1]

=SUMPRODUCT(--($G$2:INDEX(G:G,MATCH(BigNum,G:G)) >= J2),--($G$2:INDEX(G:G,MATCH(BigNum,G:G)) < J3))

I thrust you know what BigNum is.

2]

=SUMPRODUCT(--(USED(G:G) >= J2),--(USED(G:G) < J3))


USED is a function, written in VBA, that you must add as a module to your workbook:

Function Used(r As Range) As Range
'
' Harlan Grove
' Sun 25 Nov 01
'
Dim q As Range
Set q = r.Parent.UsedRange.Cells(r.Parent.UsedRange.Cells.Count)
Set Used = Intersect(r, r.Parent.Range(r.Parent.Cells(1, 1), q))
End Function

Function Used(r As Range) As Range
'
' Harlan Grove
'
Dim q As Range
Set q = r.Parent.UsedRange.Cells(r.Parent.UsedRange.Cells.Count)
Set Used = Intersect(r, r.Parent.Range(Cells(1, 1), q))
End Function
 
Upvote 0
Sounded like a good plan - but it didnt work either --

I named my range "Days Open"
Here's the function for the range:
=MASTER_Log!$G:$G

Here's the function on Sheet 2 ( that pulls the aging count over )
=SUMPRODUCT((Days_Open>=15)*(Days_Open<=30))

=SUMPRODUCT((Days_Open,">=15")*(Days_Open,"<=30"))

Last, I tried this:
=SUMPRODUCT(--(Days_Open >= J14),--(Days_Open < J15))

and typed on sheet 2 the 3 references as Aladin did:
J13 holds a zero
J14 holds a 15
J15 holds a 30

Still getting the #NUM!
:cry:
 
Upvote 0
Try this:

Insert, Name, Define
Name = BigNum
Refers to = 9.99999999999999E+307
Add

Then change Days_Open to:

Refers to:
=OFFSET($G$1,0,0,MATCH(BigNum,Sheet1!$G:$G),1)

Any luck?

Credit the method to Aladin...I'm just stealing.
 
Upvote 0
ChrisOK said:
Sounded like a good plan - but it didnt work either --

I named my range "Days Open"
Here's the function for the range:
=MASTER_Log!$G:$G

No good. You're introducing whole column reference via the backdoor!

...

and typed on sheet 2 the 3 references as Aladin did:
J13 holds a zero
J14 holds a 15
J15 holds a 31

Still getting the #NUM!
...

In J16 enter: 9.99999999999999E+307

In K16 enter & copy down:

=SUMPRODUCT(--(MASTER_Log!$G$2:INDEX(MASTER_Log!G:G,MATCH(BigNum,MASTER_Log!G:G)) >= J13),--(MASTER_Log!$G$2:INDEX(MASTER_Log!G:G,MATCH(BigNum,MASTER_Log!G:G)) < J14))
 
Upvote 0
I'd already created the BIGNUM and had used it elsewhere - so it was ready to roll with your idea!

Here's what I pasted into the Days_Open -- and it' works beautifully!

=OFFSET(MASTER_Log!$G$2,0,0,MATCH(BigNum,MASTER_Log!$G:$G),1)

THANKS SO MUCH!!!
:biggrin:
 
Upvote 0
Aladin -

I notice that you sometimes define BigNum in a cell and sometimes in the refers to box. Is there a rule to follow here, or is one more/less expensive than the other?

Thanks,

Bill
 
Upvote 0
ChrisOK said:
I'd already created the BIGNUM and had used it elsewhere - so it was ready to roll with your idea!

Here's what I pasted into the Days_Open -- and it' works beautifully!

=OFFSET(MASTER_Log!$G$2,0,0,MATCH(BigNum,MASTER_Log!$G:$G),1)

THANKS SO MUCH!!!
:biggrin:

I'd currently prefer:

=MASTER_Log!$G$2:INDEX(MASTER_Log!$G:$G,MATCH(BigNum,MASTER_Log!$G:$G))

I actually used this directly in the formula, avoiding to add another definition to your workbook. Too many dynamic names slows down a spreadsheet.
 
Upvote 0
Texas Longhorn said:
...
I notice that you sometimes define BigNum in a cell and sometimes in the refers to box. Is there a rule to follow here, or is one more/less expensive than the other?...

Defining it via Insert|Name|Define makes life a lot easier. It's true that I sometimes directly use the big number itself in a local computation. One rule that one would observe though is not to create too many dynamic names for performance reasons. I'd make an exception for Bignum and BigStr (the former a constant, the latter a formula).
 
Upvote 0

Forum statistics

Threads
1,214,998
Messages
6,122,643
Members
449,093
Latest member
Ahmad123098

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