ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Syntax help please (https://www.excelbanter.com/excel-programming/337584-syntax-help-please.html)

GettingThere

Syntax help please
 
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!


Vasant Nanavati

Syntax help please
 
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

--

Vasant


"GettingThere" wrote in message
...
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!




GettingThere

Syntax help please
 
Vasant,

That is exactly what I was looking for. Thank you very much!



"Vasant Nanavati" wrote:

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

--

Vasant


"GettingThere" wrote in message
...
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!





Vasant Nanavati

Syntax help please
 
You're welcome!

--

Vasant


"GettingThere" wrote in message
...
Vasant,

That is exactly what I was looking for. Thank you very much!



"Vasant Nanavati" wrote:

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

--

Vasant


"GettingThere" wrote in message
...
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!








All times are GMT +1. The time now is 02:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com