Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 01-14-2017, 01:21 AM
trevorc trevorc is offline Get row number from address Windows 7 32bit Get row number from address Office 2013
Competent Performer
Get row number from address
 
Join Date: Jan 2017
Posts: 173
trevorc will become famous soon enoughtrevorc will become famous soon enough
Default

Thanks again for the reply,
I have progressed a bit with this and have the following code listed below, it is creating a list of row numbers on a check sheet, i am then trying to check this against each new found row to see if is listed, if it's not then i want to add the found row, otherwise keep checking the sheet until all checked then procede to the next worksheet. I think the problem I am having now is the way find and find next are getting the row and then the 'do' action with this value. Still debugging 1 line at a time to try and find how to get it correct.

snipet from above code with current changes in red
Code:
 
If Not Found Is Nothing Then
                If Not foundNum > 1 Then
                    Worksheets("instructions").Range("A17").Value = "Sheet & Location"
                    tbl_start = Worksheets("instructions").Range("A" & 17 + foundNum).Address
                    r1 = Found.Row
                    trng = Range(tbl_start, "A" & 17 + foundNum).Address
                    Worksheets(ws.Name).Range("B2:AA2").Copy
                    Worksheets("instructions").Range("B17").Select
                    Worksheets("check sheet").Range("A1" & foundNum).Value = r1
                Else
                    foundNum = foundNum + 1
                    Worksheets("instructions").Range("A" & 17 + foundNum).Value = "Sheet & Location"
                    tbl_start = Worksheets("instructions").Range("A" & 17 + foundNum).Address
                    r1 = Found.Row
                    trng = Range(tbl_start, "A" & 17 + foundNum).Address
                    Worksheets(ws.Name).Range("B2:AA2").Copy
                    Worksheets("instructions").Range("B" & 17 + foundNum).Select
                    Worksheets("check sheet").Range("A1" & foundNum).Value = r1
                End If
                Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
                FirstAddress = Found.Address
                Do
                    foundNum = foundNum + 1
                    AddressStr = .Name & " " & Found.Address & vbCrLf
                    addr = Found.Address
                    Set Found = .Range("B3:AD10000").FindNext(Found)
                    r1 = Found.Row
                    If WorksheetFunction.CountIf(Worksheets("check sheet").Range("A1:A1000"), r1) = 0 Then
                    ' not found
                    Else
                    'found
                       ' GoTo next_worksheet
                    End If
                    Worksheets("check sheet").Range("A1" & foundNum).Value = r1
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Differentiate between my address and my address in a Distribution List fogyreef Outlook 1 01-14-2016 12:45 AM
Add link to email address that hides the actual address or makes it inaccessible to online bots richiebabes Word 1 09-03-2014 03:22 PM
Get row number from address How to forward all e-mails from one address to five (5) other e-mail address? adi2012 Outlook 1 09-09-2012 06:41 PM
HELP! Outlook 2003 Address Books - multiple account address lists ukmonkeynuts Outlook 0 06-01-2011 06:18 AM
Default Home Address over Business Address DunnDeal Outlook 1 12-03-2010 04:56 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:50 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft