+ Reply to Thread
Results 1 to 4 of 4

Syntax help please

Hybrid View

Guest Syntax help please 08-17-2005, 11:05 PM
Guest Re: Syntax help please 08-18-2005, 12:05 AM
Guest Re: Syntax help please 08-18-2005, 07:05 PM
Guest Re: Syntax help please 08-18-2005, 09:05 PM
  1. #1
    GettingThere
    Guest

    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. #2
    Vasant Nanavati
    Guest

    Re: 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" <GettingThere@discussions.microsoft.com> wrote in message
    news:0576CB23-9C9E-41F8-9FDD-73D00DBCB77E@microsoft.com...
    >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. #3
    GettingThere
    Guest

    Re: 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" <GettingThere@discussions.microsoft.com> wrote in message
    > news:0576CB23-9C9E-41F8-9FDD-73D00DBCB77E@microsoft.com...
    > >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. #4
    Vasant Nanavati
    Guest

    Re: Syntax help please

    You're welcome!

    --

    Vasant


    "GettingThere" <GettingThere@discussions.microsoft.com> wrote in message
    news:80E949DB-317D-41A2-A120-717A20D8FE6F@microsoft.com...
    > 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" <GettingThere@discussions.microsoft.com> wrote in message
    >> news:0576CB23-9C9E-41F8-9FDD-73D00DBCB77E@microsoft.com...
    >> >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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1