View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
ashish128 ashish128 is offline
external usenet poster
 
Posts: 48
Default macro code to get dynamic range

Hi Friends,

I am trying to write a macro to find if a range consists of same
values or not
Eg
A1 A1
A1 A1
A1 A1
A1 A1
A1 A2
A1 A1
Yes No <--This is formula result

The formula is =sumproduct(--("A1"<range))

The problem is that though the column number is fixed (say A) but the
number of values it has (i.e. the number of rows it extends to) is not
the same everytime. I want to get this range through macro so as to
feed it to the function.

Is there a way to find the range as a result of continous filled cells

My data is in cell A2 and extends below (No spaces / blank cells in
between).

Kindly help.

With Regards,

Ashish