[quote user="darth666"]I want to do just one scan to assign lengths values to proper line numbers [/quote]
Create a reference to Microsoft Scripting Runtime (scrun.dll) in the VBA IDE. Now you can create a Dictionary object.
A Dictionary stores key, value pairs of information. In your case, the key is your segment number, and value is your line length. Scan your DGN model once to build a Dictionary of segment numbers and line lengths.
Now you can iterate your worksheet. Each time you find a segment number, look up the corresponding line length in your Dictionary.