View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gina[_2_] Gina[_2_] is offline
external usenet poster
 
Posts: 49
Default Please help me with this function? I am struggling..

I noticed it works great- but has one tiny bug.

If the Central District has two claims on the same day- the claim on the
lower row returns the value 34790. I could make a search/replace macro for
34790 to 0, unless you know a quickfix?

Gina

"John C" wrote:

lol, thanks for the feedback. But trust me, everything I know is self-taught,
and there are multiple posters on here who know way more than me. But again,
thanks for the feedback. (I had noticed you didn't change all the cell
references as needed :), and since I still had the 'scrap work', I modified
and fixed).
--
John C


"Gina" wrote:

If you ever do consulting, email me. I get offered stuff way over my head
from time to time-- aka-- the level of Excel you normally occupy.

Gina

"John C" wrote:

Remember, this formula, entered in C2, is an array** formula, and when you
first enter it, press CTRL+SHIFT+Enter to commit it. Then copy down as needed.
--
John C


"John C" wrote:

=IF(COUNTIF($G$1:$G1,G2)<0,D2-MAX(IF(($G$2:$G$2500=G2)*($D$2:$D$2500<D2),$D$2:$D $2500)),"")


--
John C


"Gina" wrote:

The first row of the spreadsheet contains headers.

In Cells D2:D2500 my spreadsheet gives a list of dates specific events occur.

In Cells G2:G2500 my spreadsheet lists the district in which these events
occur.

In Cells C2:C2500 I need to count the # of days since the last event that
occurred within this district.



I am trying to get this formula to work, and can't seem to do it (but thank
you JohnC, I think you've given me an excellent start- if I was better at
this, I'd have probably figured it out and wouldn't need to ask this
question).



=IF(COUNTIF($D$1:$D2,D3)<0,D3-MAX(IF(($G$2:$G$2500=G3)*($D$2:$D$2500<D3),$D$2:$D $2500)),"")