View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
ker_01 ker_01 is offline
external usenet poster
 
Posts: 395
Default Determining Change in a cell Value....

I may have misunderstood your intention, but from your sample output, it
appears that you want the minimum start time and the maximum stop time for
each number in Column A (you describe only bringing over changes, and I'm
assuming your start time doesn't change and that you don't have entries
further in the list that have a stop time later than entries further down the
list)

Is your unique list (the output section, Column A) already created, or do
you need to create that on the fly from your data?

If it is already created, I wouldn't even use VBA (unless you have a large
amount of raw data and/or a lot of output values).

Instead, I'd use something like:

(col B, where your first output value is in row 20; source data is rows 2-10)
=MIN(IF((A20=A$2:A$10)*1,B$2:B$10,""))
(col c)
=MAX(IF((A20=A$2:A$10)*1,C$2:C$10,""))

note that both of these have to be entered as array formulas, e.g.
Ctrl-Alt-Enter

If you do need to create the unique lists on the fly, then post back with
clarification for additional assistance.

HTH,
Keith

"mju" wrote:

Please i need some Help...

Number (Col A) Start (Col B) End (Col C)
Tp1203 01/20/2009 02/01/2009
Tp1203 01/20/2009 02/01/2009
Tp1203 01/20/2009 02/01/2009
Sb507 05/20/2009 06/10/2009
Sd702 07/08/2010 08/20/2010
Tp1203 01/20/2009 02/01/2009
Tp5203 01/10/2010 01/30/2010
Sb507 05/20/2009 06/10/2009
Sb507 05/20/2009 06/10/2009


This is what I want to have as my final result

Tp1203 01/20/2009 02/01/2009
Sb507 05/20/2009 06/10/2009
Sd702 07/08/2010 08/20/2010
Tp5203 01/10/2010 01/30/2010

How do I check the values in each cell in column A. Whenever the value
changes, it should give me the number, start and end. It should do nothing if
it is same. I just want the number , start and end repeated once. Values
should also be returned if is only one one number, start and cancel.