Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8036371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:35:55+00:00 2026-06-05T02:35:55+00:00

Update: sample file sample workbook Problem : I would like to have something that

  • 0

Update: sample file sample workbook

Problem: I would like to have something that can automatically

1. Search for the part number and revision. After the cell which contains “PART NUMBER” and “REVISION” is found, I need to get the values of below two cell (offset 1 column).

2. It will continue to look for the summary table

3. Put the summary table to a result sheet

4. Continue searching and repeat the process

There are:

  • Possible of multiple parts number on the same sheet or just 1
  • Only searching for the Sheet with starting name: “Search”

enter image description here

enter image description here

First Picture shows the structure of the file and the Second Picture shows the result

This will help a lot if it is doable. Please help me.

Update 1:
Logic as I think:
1. Write a module to search for all sheets starting with name “SEARCH”

  1. Go to each sheet resulted from step 1 – to search .NEXT for PART NUMBER and REVISION to get all part number name and revision (addressing by offset(0,1))

  2. Start to search for the summary table ==> It gets to complicated point

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T02:35:58+00:00Added an answer on June 5, 2026 at 2:35 am

    Is this what you are trying?

    enter image description here

    CODE

    Option Explicit
    
    Const SearchString As String = "PART NUMBER"
    
    Dim wsO As Worksheet, WsI1 As Worksheet, WsI2 As Worksheet
    Dim lRow As Long
    
    Sub Sample()
        Set wsO = Sheets("Result")
        Set WsI1 = Sheets("SEARCH PAGE1")
        Set WsI2 = Sheets("SEARCH PAGE2")
    
        lRow = 2
    
        PopulateFrom WsI1
        PopulateFrom WsI2
    End Sub
    
    Sub PopulateFrom(ws As Worksheet)
        Dim aCell As Range, bCell As Range, cCell As Range, nmRng As Range, cl As Range
        Dim i As Long
        Dim ExitLoop As Boolean
    
        With ws
            Set aCell = .Cells.Find(What:=SearchString, LookIn:=xlValues, _
                        LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
                        MatchCase:=False, SearchFormat:=False)
    
            If Not aCell Is Nothing Then
                Set bCell = aCell
                wsO.Range("A" & lRow).Value = aCell.Offset(1).Value
                wsO.Range("B" & lRow).Value = aCell.Offset(1, 3).Value
                i = 1
                Do
                    If aCell.Offset(i) = "NAME" Then
                        Set nmRng = .Range(aCell.Offset(i), aCell.Offset(i).End(xlDown))
                         For Each cl In nmRng
                            If cl.Value <> "NAME" Then
                                If wsO.Range("A" & lRow).Value = "" Then
                                    wsO.Range("A" & lRow).Value = wsO.Range("A" & lRow - 1).Value
                                    wsO.Range("B" & lRow).Value = wsO.Range("B" & lRow - 1).Value
                                End If
    
                                wsO.Range("C" & lRow).Value = cl.Value
                                wsO.Range("D" & lRow).Value = cl.Offset(, 1).Value
                                wsO.Range("E" & lRow).Value = cl.Offset(, 2).Value
                                wsO.Range("F" & lRow).Value = cl.Offset(, 3).Value
                                lRow = lRow + 1
                            End If
                         Next
                        Exit Do
                    End If
                    i = i + 1
                Loop
    
                Do While ExitLoop = False
                    Set aCell = .Cells.FindNext(After:=aCell)
    
                    If Not aCell Is Nothing Then
                        If aCell.Address = bCell.Address Then Exit Do
                        wsO.Range("A" & lRow).Value = aCell.Offset(1).Value
                        wsO.Range("B" & lRow).Value = aCell.Offset(1, 3).Value
                        i = 1
                        Do
                            If aCell.Offset(i) = "NAME" Then
                                Set nmRng = .Range(aCell.Offset(i), aCell.Offset(i).End(xlDown))
                                 For Each cl In nmRng
                                    If cl.Value <> "NAME" Then
                                        If wsO.Range("A" & lRow).Value = "" Then
                                            wsO.Range("A" & lRow).Value = wsO.Range("A" & lRow - 1).Value
                                            wsO.Range("B" & lRow).Value = wsO.Range("B" & lRow - 1).Value
                                        End If
                                        wsO.Range("C" & lRow).Value = cl.Value
                                        wsO.Range("D" & lRow).Value = cl.Offset(, 1).Value
                                        wsO.Range("E" & lRow).Value = cl.Offset(, 2).Value
                                        wsO.Range("F" & lRow).Value = cl.Offset(, 3).Value
                                        lRow = lRow + 1
                                    End If
                                 Next
                                Exit Do
                            End If
                            i = i + 1
                        Loop
                    Else
                        ExitLoop = True
                    End If
                Loop
            End If
        End With
    End Sub
    

    SAMPLE FILE

    i.minus.com/1338702873/20yZJWFxgv9Egtd4klNOBg/dtst1Y4ckv86f/Sample.xlsm

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a 2-part question... I have some XML that looks like: <trans-unit id=70
[Update]: my initial example doesn't reflect my problem. Updated the sample, hopfully it is
I'm trying to do a simple update, but can't figure out somthing. I have
I have a sample file containg aA0_- characters on each one on a single.
Update: A sample project reproducing this bug can be found here at Microsoft Connect
Hello everybody. I would like to know how to download and save a file
Every sample that I have seen uses static XML in the xmldataprovider source, which
I have following sample CSV file rc,u,s,ui,gh m,1,8,0,12 n,3,0,0,7 d,1,1,8,0 I want to read
I have to edit the existing file named root.propertis and update it without saving
I have a sample JSON with some part of my webpage rendered : {html:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.