View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
cyndiwise notsowise cyndiwise notsowise is offline
external usenet poster
 
Posts: 16
Default Calculate next number using dates?

Thanks, Biff. The results are initially correct, but only if I leave the rows
in the order I entered them. I need to be able to sort the data by different
columns depending upon the data I am looking for. When I sorted my worksheet
by Column P, then the associated numbers in Column A changed.

Example, before sorting:
A2 = 38116.01, B2 = 5/9/2004, C2 = Bonnie, ...P2 = 3.10
A3 = 38116.02, B3 = 5/9/2004, C3 = Annie, ...P3 = 2.50
A4 = 38116.03, B4 = 5/9/2004, C4 = Sally, ...P4 = 6.00
A5 = 38116.04, B5 = 5/9/2004, C5 = George, ...P5 = 1.75
A6 = 38117.01, B6 = 5/10/2004, C6 = Ernie, ...P6 = 1.67
A7 = 38117.02, B7 = 5/10/2004, C7 = Martha, ...P7 = 4.50

After sorting by Column P:
A2 = 38117.01, B2 = 5/10/2004, C2 = Ernie, ...P2 = 1.67
A3 = 38116.01, B3 = 5/9/2004, C3 = George, ...P3 = 1.75
A4 = 38116.02, B4 = 5/9/2004, C4 = Annie, ...P4 = 2.50
A5 = 38116.03, B5 = 5/9/2004, C5 = Bonnie, ...P5 = 3.10
A6 = 38117.02, B6 = 5/10/2004, C6 = Martha, ...P6 = 4.50
A7 = 38116.04, B7 = 5/9/2004, C7 = Sally, ...P7 = 6.00

I put unique values (names) in Column C just to test this. In reality, the
values in all columns except A can be repeated any number of times. That is
why I need unique values in Column A that will "stick" with the original
associated rows.

Maybe I copied the formula incorrectly into the other cells in column A?
What am I missing?

Thanks again for all your help!

cyndiwise
------------------------------------------------------------------------------------------------

"T. Valko" wrote:

now there's an error message displaying for some of the cells
containing the formula.


Is the result of the formula correct?

I suspect that's just Excel trying to be "helpful". Those are error checking
messages that Excel displays. My version (Excel 2002) doesn't have that
particular message. Personally, I hate them and find them to be an intrusive
PITA and have turned them off. All those colored triangles! Argh!

The setting for those messages can be found at ToolsOptionsError
CheckingRules. If you want to turn them off (or some of them) just uncheck
them under Rules.

Biff

"cyndiwise notsowise" wrote
in message ...
Oops! I "translated" your formula incorrectly for my worksheet. Column A
contains the formula, Column B contains the date, Row 1 is a Header Row.
Now
the values are listing sequentially with this formula:
=B2+COUNTIF(B$2:B2,B2)/100

However, now there's an error message displaying for some of the cells
containing the formula. The error message says: "the formula in this cell
refers to a range that has additional numbers adjacent to it". Did I still
do
something wrong in translating the formula to fit my worksheet? I have
Columns A thru Q, some of which have numbers and others that contain text,
and some contain other formulas.

Thanks so much for your help.

cyndiwise
---------------------------------------------------------------------------------------

"T. Valko" wrote:

The formula I suggested does exactly what you want. Post the *exact*
formula
you tried.

Biff

"cyndiwise notsowise"
wrote
in message ...
Thanks for your quick reply, T. Valko. You are correct, there should
never
be
more than 99 instances of the same date (far less, I'm sure!)

However, I tried the formula and it numbers every instance of the date
the
same. I need the numbers to be unique for every instance:
38116.01
38116.02
38116.03
and so on...

Do you think this is possible?

cyndiwise
----------------------------------------------------------------------------------------

"T. Valko" wrote:

If there are more than 100 instances then the date will advance after
38116.99

I'm guessing that that is not a possibility?

=A1+COUNTIF(A$1:A1,A1)/100

Copy down as needed. Format as GENERAL to get the serial number.

Biff

"cyndiwise notsowise"
wrote
in message ...
Here's what I'm trying to do:
Using Excel's date serial numbers, create a unique value for every
instance
of the same date in a column.

For instance, if there are two instances of the date 5/9/2004 in the
same
column, then I want to display a value similar to this in the same
row
of
a
different column: 38116.01 for one instance, and with the next
instance
having this value: 38116.02. This value should increase
incrementally
by
.01
every time a new instance of the same date is added to the column.

I hope this makes sense and that it's possible with a formula, not a
macro.
Thanks in advance for your help!