Improvement if no - at the bottom
lr = Cells(Rows.Count, "a").End(xlUp).Row
If Cells(lr, 1) <> "-" Then
Cells(lr + 1, 1) = "-"
lr = lr + 1
End If
c1 = 1
Do Until c1 + 1 >= lr
c1 = Range(Cells(c1, 1), Cells(lr, 1)).Find("-").Row
c2 = Range(Cells(c1 + 1, 1), Cells(lr, 1)).Find("-").Row - 1
Cells(c2, 2) = Application.Max(Range(Cells(c1, 1), Cells(c2, 1)))
c1 = Range(Cells(c2, 1), Cells(lr, 1)).Find("-").Row - 1
Loop
--
Don Guillett
SalesAid Software
(E-Mail Removed)
"Don Guillett" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> >not possible for this work.
> Why not
>
> lr = Cells(Rows.Count, "a").End(xlUp).Row
> c1 = 1
> Do Until c1 + 1 >= lr
> c1 = Range(Cells(c1, 1), Cells(lr, 1)).Find("-").Row
> c2 = Range(Cells(c1 + 1, 1), Cells(lr, 1)).Find("-").Row - 1
> Cells(c2, 2) = Application.Max(Range(Cells(c1, 1), Cells(c2, 1)))
> c1 = Range(Cells(c2, 1), Cells(lr, 1)).Find("-").Row - 1
> Loop
>
> --
> Don Guillett
> SalesAid Software
> (E-Mail Removed)
> "Mika" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Thanks both,
>>
>>
>> Don you are right with vba is piece of cake, but not possible for this
>> work.
>>
>> Ron, I included at the beggining of those cells a comment:
>> "solution proposed by Ron Coderre"
>>
>>
>> Thanks it worked like a charm !
>>
>> Mika
>>
>
>