Thread: Counting macro
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Lonpuz Lonpuz is offline
external usenet poster
 
Posts: 15
Default Counting macro

Eric,

I think I know what your trying to do. Are you familiar with using the
{countif} formula. I believe using that may solve your problem without using
a macro. That is, unless you just need to know the address of the first cell
that deviates from the condition. If that is the case, you may be able to
still use {countif}, with another nested {if} statement. Let me know if this
helps. If not, please elaborate on what your desired result is.

"Eric" wrote:

Hello all,
I am trying to have a macro count the number of lines down if it doesn't
match the last line.
ie:
Date c1 c2 c3
11/8 10 20 30
11/8 10 20 30
11/8 10 20 30
11/8 10 20 30

If I have 4 rows of info and the new date is now 11/9 it won't match row 4
but I want it to count down from row one to row three and replace the
information on rows three and four. If I had to count down two rows then row
three and four would have the date and info as follows:

ie: (Go down 2 row)
Date c1 c2 c3
11/8 10 20 30
11/8 10 20 30
11/9 20 30 40
11/9 20 30 40

This would carrie on for 400 rows. I hope this makes sense. If not I will
try to explain again.

Eric