Syntax help please

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a worksheet - lets call it listSheet - that contains a list of names
in A2:A25, and a list of other text in B2:B50.

Running my code on active sheet, how do I accomplish:

For i = 2 to lstRow
If cells (i,1).value is found in listSheet A2:A25 AND
cells(i,2).value is found in listSheet B2:B50 Then
cells (i,1) through cells(i,6).font.bold = true
next i

Thanks in advance!
 
If Not Worksheets("listSheet").Range("A2:A25").Find (Cells(i, 1)) Is Nothing
_
And Not Worksheets("listSheet").Range("B2:B50").Find (Cells(i, 1)) Is
Nothing _
Then Cells(i, 1).Resize(, 6).Font.Bold = True
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top