+ Reply to Thread
Results 1 to 5 of 5

I'm not sure where to begin.

Hybrid View

djwaffle I'm not sure where to begin. 02-28-2013, 04:08 PM
aetedford Re: I'm not sure where to... 02-28-2013, 04:15 PM
JasonLeisemann Re: I'm not sure where to... 02-28-2013, 04:29 PM
mike7952 Re: I'm not sure where to... 02-28-2013, 04:40 PM
arlu1201 Re: I'm not sure where to... 03-01-2013, 01:18 AM
  1. #1
    Registered User
    Join Date
    02-28-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1

    I'm not sure where to begin.

    Please help. . . . .
    So I have some spreadsheets with various values in them and with some 1500 rows I need a faster way to do this report every month.

    IPsheet.pngbilling-sheet.png

    Here is what I'm trying to do. I need to search the billing sheet for the IP from the IP Sheet (col. A) and paste the most recent date and time from (col. E) into (col. C) on the IP sheet. these are different files and the real billing file is over 200mb and growing. .

    I am open to any suggestions anyone may have.

    Thank you. . . William

  2. #2
    Registered User
    Join Date
    01-02-2013
    Location
    NY
    MS-Off Ver
    Excel Office 365
    Posts
    49

    Re: I'm not sure where to begin.

    Like a vlookup?

  3. #3
    Registered User
    Join Date
    11-29-2012
    Location
    Madison, WI
    MS-Off Ver
    MS Office 2010 (Excel, Word, Access)
    Posts
    72

    Re: I'm not sure where to begin.

    Ah... I think I see why VLookup wouldn't work for you, since you need the latest timestamp and could have multiple options.

    Maybe give this a shot?
    Option Explicit
    Dim lngOne, lngTwo, lngLatest, lngLastRow As Long
    Dim strIP As String
    
    
    Sub IPFinder()
        lngLastRow = Workbooks(Book1).Worksheets(1).Cells(1048576, 1).End(xlUp).Row
        For lngOne = 1 To lngLastRow
            strIP = Workbooks(Book1).Worksheets(1).Cells(lngOne, 1)
            Workbooks(Book1).Worksheets(1).Cells(lngOne, 3) = TimeTester(strIP)
        Next
    End Sub
    
    Function TimeTester(strIP As String) As String
        For lngTwo = 1 To lngLastRow
            If Workbooks(book2).Worksheets(1).Cells(lngTwo, 2) = strIP Then
                If lngLatest = 0 Or Workbooks(book2).Worksheets(1).Cells(lngLatest, 5) _
                    <= Workbooks(book2).Worksheets(1).Cells(lngTwo, 5) Then
                    lngLatest = lngTwo
                End If
            End If
        Next
        TimeTester = Workbooks(book2).Worksheets(1).Cells(lngLatest, 5)
    End Function
    Not sure how the time factor will work out for you. There are probably more elegant ways to do it, but this should be a workable brute-force option once everything's put in.

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: I'm not sure where to begin.

    Can you upload your example in a workbook, its hard to mockup a workbook to test on from pics.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: I'm not sure where to begin.

    Djwaffle, welcome to the forum.

    Please take a moment to read the forum rules and then amend your thread title to something descriptive of your problem. Once you have done this please send me a PM and I will remove this request.

    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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