Results 1 to 4 of 4

Convert PDF header to Excel headers

Threaded View

taichi56 Convert PDF header to Excel... 03-31-2011, 04:57 PM
mojo249 Re: Convert PDF hearder to... 03-31-2011, 06:31 PM
taichi56 Re: Convert PDF hearder to... 04-01-2011, 10:56 AM
taichi56 Re: Convert PDF hearder to... 04-04-2011, 04:27 PM
  1. #1
    Forum Contributor
    Join Date
    05-04-2008
    Posts
    103

    Convert PDF header to Excel headers

    I received the following code from this forum:

    Sub Test()
    Sheets(1).Activate
    Sheets(2).Cells.Clear
    For N = 1 To Cells(Rows.Count, 1).End(xlUp).Row
        If Cells(N, 1) <> "" Then
            If Left(Cells(N, 3), 3) = "DOB" Then
                StudentID = Left(Cells(N, 1), InStr(Cells(N, 1), " ") - 1)
                StudentName = Trim(Right(Cells(N, 1), Len(Cells(N, 1)) - Len(StudentID)))
                DOB = Right(Cells(N, 3), Len(Cells(N, 3)) - 5)
            ElseIf IsNumeric(Cells(N, 1)) Then
                TargetRow = Sheets(2).Cells(Rows.Count, 1).End(xlUp).Row + 1
                Sheets(2).Cells(TargetRow, 1) = StudentID
                Sheets(2).Cells(TargetRow, 2) = StudentName
                Sheets(2).Cells(TargetRow, 3) = DOB
                Sheets(2).Cells(TargetRow, 4) = Cells(N, 3)
                Sheets(2).Cells(TargetRow, 5) = Cells(N, 6)
                Sheets(2).Cells(TargetRow, 6) = Cells(N, 8)
                Sheets(2).Cells(TargetRow, 7) = Cells(N, 9)
                Sheets(2).Cells(TargetRow, 8) = Cells(N, 10)
                Sheets(2).Cells(TargetRow, 9) = Cells(N, 11)
                Sheets(2).Cells(TargetRow, 10) = Cells(N, 12)
                Sheets(2).Cells(TargetRow, 11) = Cells(N, 13)
                Sheets(2).Cells(TargetRow, 12) = Cells(N, 1)
            End If
        End If
    Next N
    End Sub
    This code has helped me tremendously. But now I need it for another PDF sheet that is formatted a little different and I cannot seem to get it to work. I have attached a sample of the info with the VBA coding. I have a workbook that has 2500 students formatted this way. I need to be able to put it in a format that I can upload to a database. Thank you.
    Attached Files Attached Files

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