Hello,
I have a table like in attachment and I would like to sort data like in table below. If cell.Value in B1 is > 0 then I want to insert numbers of rows below = how many cells on the right have
value > 0, then I want to copy those numbers in this cells below - transpose. In this case I need to insert 4 rows below. If value is 0 or #N/A nothing happens.
I want to do it for all rows in ActiveSheet.
I have started like this, this is only beginening:
thanks
I have a table like in attachment and I would like to sort data like in table below. If cell.Value in B1 is > 0 then I want to insert numbers of rows below = how many cells on the right have
value > 0, then I want to copy those numbers in this cells below - transpose. In this case I need to insert 4 rows below. If value is 0 or #N/A nothing happens.
I want to do it for all rows in ActiveSheet.
I have started like this, this is only beginening:
Code:
For Each cell in range ("B:B")
If B2.value > 0 then
Range("B2").Select
Selection.EntireRow.Insert
Selection.EntireRow.Insert
Selection.EntireRow.Insert
Selection.EntireRow.Insert
Range("C1:F1").Select
Selection.Copy
Range("B2").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Range("I5").Select
End if
Next
thanks