Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

More Excel Heartache

Status
Not open for further replies.

RicksAtWork

Programmer
Nov 1, 2005
120
GB
I have filtered a worksheet via the following code:

Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:=CStr(individual)


On JUST this selection I want to iterate throw column b and perform a VLookUp for each row:

myAnswer = Application.WorksheetFunction.VLookup(row here, Range("Scoring_JournalTitle"), 4, False)


How do I iterate through the filtered rows?
 
I can access a column like this:

ActiveSheet.AutoFilter.Range.Columns(20)

but how do I get the value in each cell?
 
Do you really have to use Autofilter? If you have 1 critera, then a For Each loop with an IF statement will get you all the matching rows.

What are you going to be doing with the VLOOKUP? Which cell of the row goes into it? What are you going to do with the answer?

Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top