Parent child relation between two rows in an excel sheet

R

Roshan Kumar

Hi,

I want to know if there is any way in which we can determine the parent/child relation (i.e. one row is dependent on another row) using .NET.

My requirement is that when I have this kind of relation I should allow the deletion of parent row.

Please let me know if anyone has any idea about this.

Thanks.
 
I

isabelle

there isn't no parent/child relation, but you can use "offset" to determine the line before or thereafter


Sub test()
With ActiveCell
MsgBox .Row
MsgBox .Offset(-1, 0).Row
MsgBox .Offset(1, 0).Row
End With
End Sub
 
I

isabelle

or maybe that you mean "merger range"
if A1:A3 are a merger range
SecondRow = Range("A1").Item(2).Row
the SecondRow's return value will be 2
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top