Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default 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!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default 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!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default 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!




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default 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!






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
right syntax pls123 Excel Worksheet Functions 8 May 6th 10 05:18 AM
SQL syntax Spike Excel Worksheet Functions 2 March 8th 07 08:27 AM
Syntax Help Dmorri254 Excel Worksheet Functions 2 March 2nd 05 02:51 PM
Syntax James Bronsan Excel Programming 1 August 12th 04 09:09 PM
Syntax Michael[_23_] Excel Programming 1 December 30th 03 10:08 PM


All times are GMT +1. The time now is 06:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"