+ Reply to Thread
Results 1 to 3 of 3

Thread: Define a hierarchy for superior and sub equipment

  1. #1
    Registered User
    Join Date
    11-18-2011
    Location
    Heidelberg, Germany
    MS-Off Ver
    Excel 2003
    Posts
    2

    Define a hierarchy for superior and sub equipment

    Hi folks,

    I have a tricky question hopefully one of you can help answer. I would like to automate the following scenario.

    I have a list of records that each has a unique identifier (equipment #). Some records are noted "Superior" and the rest are considered "sub".

    For the "sub" equipment I want to populate the equipment # from the superior equipment.

    Is there a way to do this programatically? An example file is attached.

    Thanks in advance!!
    Attached Files Attached Files
    Last edited by heidelberger75; 11-18-2011 at 08:02 AM.

  2. #2
    Forum Guru snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,151

    Re: Define a hierarchy for superior and sub equipment

    Sub snb()
     With Sheets(1).Cells(1).CurrentRegion.Columns(1)
      .AutoFilter 1, "sub"
      For Each ar In .Offset(1).SpecialCells(12).Areas
       ar.Offset(, 2) = ar.Cells(1).Offset(-1, 1).Value
      Next
      .AutoFilter
     End With
    End Sub



  3. #3
    Registered User
    Join Date
    11-18-2011
    Location
    Heidelberg, Germany
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Define a hierarchy for superior and sub equipment

    Fantastic! Thank you!!!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0