Forum Discussion

Dayton17's avatar
Dayton17
Copper Contributor
Nov 29, 2018

Hi I'm looking for help on a excel maybe a macro help.

I really don't know what I am looking for.  I know what I need in the end just don't know if or how I can get there.  I have a Bill of Material I have exported out of Solidworks into and Excel spreadsheet.  I need it indented on column B and C to match the numbering in Column A.  See structure as imported attached

 

 

1         1010131          install assy, BIP w/wing lockers-lh                                    1

1.1           1010047          assy, nut-plate aft outboard doubler                            1

1.1.1              1310120          nut plate, aft outboard                                            1

ETC........  the numbering sequence can go over as many as 6+ places.

 

TIA Dayton

 

 

  • Not sure about the macro to convert in place, but if transform your data into another place, you may do with formulas. Idea is to calculate number of dots in the cell of first column and add intend (actually add spaces in the front) value in second column. Formula could be like

    =REPT(" ",2*LEN($A1)-LEN(SUBSTITUTE($A1,".",""))) & TRIM(B1)

    I guess the same could be done with Power Query

     

     

Resources