+ Reply to Thread
Results 1 to 5 of 5

How to identify text (compare) in one sheet, then move it another

  1. #1
    Registered User
    Join Date
    10-28-2005
    Location
    Stockholm, Sweden
    Posts
    13

    Unhappy How to identify text (compare) in one sheet, then move it another

    Hi!

    I have a problem I hope someone here can help me with. I have two sheets in my excel file.

    Sheet 1: A table of contents. All in the A column (e.g. "1.2.4 This and that")
    E.g.
    1 Introduction
    1.1 Purpose
    2
    3
    3.1
    3.1.1

    Sheet 2: The entire document. An ID# in A and then the text in B.

    What I want to do is to match all the ID's in sheet two to the ToC in sheet one. I.e. I "simply" want each ID# for each heading in the document to show up in sheet one. I also want all ID's under each heading to be inserted under each heading in the ToC.

    It is all a requirement doc listing for all the requirements. Basically what I want to do is to list all the eq ID's in sheet two under with the corresponding heading in sheet one.

    So, I want to compare the headings in each sheet. If they match, I want to insert the ID#'s in sheet two under the matching heading in sheet one.

  2. #2
    keepITcool
    Guest

    Re: How to identify text (compare) in one sheet, then move it another


    use word not excel.

    --
    keepITcool
    | www.XLsupport.com | keepITcool chello nl | amsterdam


    mag7417 wrote :

    >
    > Hi!
    >
    > I have a problem I hope someone here can help me with. I have two
    > sheets in my excel file.
    >
    > Sheet 1: A table of contents. All in the A column (e.g. "1.2.4 This
    > and that")
    > E.g.
    > 1 Introduction
    > 1.1 Purpose
    > 2
    > 3
    > 3.1
    > 3.1.1
    >
    > Sheet 2: The entire document. An ID# in A and then the text in B.
    >
    > What I want to do is to match all the ID's in sheet two to the ToC in
    > sheet one. I.e. I "simply" want each ID# for each heading in the
    > document to show up in sheet one. I also want all ID's under each
    > heading to be inserted under each heading in the ToC.
    >
    > It is all a requirement doc listing for all the requirements.
    > Basically what I want to do is to list all the eq ID's in sheet two
    > under with the corresponding heading in sheet one.


  3. #3
    Registered User
    Join Date
    10-28-2005
    Location
    Stockholm, Sweden
    Posts
    13

    Word/Excel

    You suggest I use word for what I want to do? Well, I wish I could but I am working with excel and to tell you the truth I don't understand your comment. How could I accomplish what I want to do then?

    Sincerely,

    M.

  4. #4
    keepITcool
    Guest

    Re: How to identify text (compare) in one sheet, then move it another


    I use Excel for practically anything.
    but for what you want to do MsWord seems a better tool.

    it can autonumber your paragraphs, create an outline etc.

    If you want to do that in Excel you've got to write a macro
    like:

    Sub CreateOutline()
    Dim rngText As Range
    Dim rngSumm As Range
    Dim rngCell As Range
    Dim lRow&

    With Worksheets(1)
    Set rngSumm = Intersect(.UsedRange, .Columns(1))
    End With

    With Worksheets(2)
    Set rngText = Intersect(.UsedRange, .Columns(1))
    End With

    rngSumm.Clear
    Set rngSumm = rngSumm.Cells(1)
    For Each rngCell In rngText.Cells
    If Len(rngCell) Then
    lRow = lRow + 1
    With rngSumm(lRow, 1)
    .Hyperlinks.Add Anchor:=.Cells(1), _
    Address:="", _
    SubAddress:="'" & rngCell.Worksheet.Name & _
    "'!" & rngCell.Address(), _
    TextToDisplay:=rngCell.Text
    End With
    End If
    Next

    End Sub


    --
    keepITcool
    | www.XLsupport.com | keepITcool chello nl | amsterdam


    mag7417 wrote :

    >
    > You suggest I use word for what I want to do? Well, I wish I could
    > but I am working with excel and to tell you the truth I don't
    > understand your comment. How could I accomplish what I want to do
    > then?
    >
    > Sincerely,
    >
    > M.


  5. #5
    Registered User
    Join Date
    10-28-2005
    Location
    Stockholm, Sweden
    Posts
    13

    Appreciate

    I just want to say that I appreciate the help. The thing is that I need to do it in excel. Not a lot of fun, but it still needs to be done. I will try to look at what you sent me. I think perhaps there may be some errors in what you sent me but I am sure.

+ 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.6.0 RC 1