Hi, I am trying to locate a specific value (using FIND) in a different ws and then need to get the ROW info so I can grab data from cells in that row to populate in my active worksheet... I pasted the code I'm working with below, but I am guessing at how to get the row info and have been unable to find it..
Also, sorry I don't know how to paste the code so neatly like everyone else does!
Dim LastRw As Long, Rw As Long, Cnt As Long, CrntRw As Long, R As Long
Dim dSht As Worksheet, dSht2 As Worksheet, dSht3 As Worksheet, tSht As Worksheet, Tst As Worksheet
Dim MakeBooks As Boolean, SavePath As String
Dim Acct As String
Dim wtf As Range
Application.ScreenUpdating = False 'speed up macro execution
Application.DisplayAlerts = False 'no alerts, default answers used
Set dSht = Sheets("GroupMembership-Aug") 'sheet with data on it starting in row2
Set dSht2 = Sheets("CertAssign")
Set dSht3 = Sheets("ACTIVEACCOUNTS")
Set tSht = Sheets("Template") 'sheet to copy and fill out
Cnt = 0
'Determine last row of data then loop through the rows one at a time
LastRw = dSht.Range("A" & Rows.Count).End(xlUp).Row
For Rw = 2 To LastRw
Acct = dSht.Range("E" & Rw)
On Error Resume Next
Set Tst = ActiveWorkbook.Worksheets(Acct)
'Verify that the proposed sheet name does not already exist in the workbook.
If Tst Is Nothing Then
tSht.Copy After:=Worksheets(Worksheets.Count) 'copy the template
With ActiveSheet 'fill out the form
'edit these rows to fill out your form, add more as needed
.Name = Acct
.Range("E2").Value = dSht.Range("B" & Rw).Value
.Range("B2").Value = dSht.Range("F" & Rw).Value
.Range("H2").Value = dSht.Range("C" & Rw).Value
Set wtf = dSht3.Range(AcctDesc).Find(Acct)
R = wtf.Row
.Range("B4").Value = dSht3.Range("I" & R).Value
Thanks so much..
Also, sorry I don't know how to paste the code so neatly like everyone else does!
Dim LastRw As Long, Rw As Long, Cnt As Long, CrntRw As Long, R As Long
Dim dSht As Worksheet, dSht2 As Worksheet, dSht3 As Worksheet, tSht As Worksheet, Tst As Worksheet
Dim MakeBooks As Boolean, SavePath As String
Dim Acct As String
Dim wtf As Range
Application.ScreenUpdating = False 'speed up macro execution
Application.DisplayAlerts = False 'no alerts, default answers used
Set dSht = Sheets("GroupMembership-Aug") 'sheet with data on it starting in row2
Set dSht2 = Sheets("CertAssign")
Set dSht3 = Sheets("ACTIVEACCOUNTS")
Set tSht = Sheets("Template") 'sheet to copy and fill out
Cnt = 0
'Determine last row of data then loop through the rows one at a time
LastRw = dSht.Range("A" & Rows.Count).End(xlUp).Row
For Rw = 2 To LastRw
Acct = dSht.Range("E" & Rw)
On Error Resume Next
Set Tst = ActiveWorkbook.Worksheets(Acct)
'Verify that the proposed sheet name does not already exist in the workbook.
If Tst Is Nothing Then
tSht.Copy After:=Worksheets(Worksheets.Count) 'copy the template
With ActiveSheet 'fill out the form
'edit these rows to fill out your form, add more as needed
.Name = Acct
.Range("E2").Value = dSht.Range("B" & Rw).Value
.Range("B2").Value = dSht.Range("F" & Rw).Value
.Range("H2").Value = dSht.Range("C" & Rw).Value
Set wtf = dSht3.Range(AcctDesc).Find(Acct)
R = wtf.Row
.Range("B4").Value = dSht3.Range("I" & R).Value
Thanks so much..