CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2000
    Location
    Florida
    Posts
    130

    Excel Programming

    Hi,
    Does anyone know where I can find some good resources for doing some programming within Excel?
    Just to give you an Idea of what is going on, I have a spread sheet and I want to add a search tool that will let the user enter a search key and then press "Find" then the results will be highlighted. I'm not sure where to start.
    Thanks.

  2. #2
    Join Date
    Apr 1999
    Location
    Toronto, Canada
    Posts
    91
    Go to references - add microsoft excel 8 lib. press f2 and you can browse thorugh the methods and properties of workbooks and worksheets. Then you can right click on them and go to help - they have very good examples there. I found everything that i wanted there.

  3. #3
    Join Date
    Nov 2001
    Location
    Little Rock AR
    Posts
    255

    Somewhere to start

    I am doing a search for duplicate entries in adjacent cells. You could scab some of this for what you are trying to do.

    keep me posted I have some search code but cannot find in now.

    LJ

    Public Function FindDupAddresses()
    k = 0
    xlsWWDB.Worksheets("Discrete IO").Select
    i = 1
    While Cells(i, 14) <> ""
    If Cells(i, 16) = Cells(i + 1, 16) Then
    Cells(i, 16).Interior.ColorIndex = 3
    Cells(i + 1, 16).Interior.ColorIndex = 3
    k = k + 1
    Else
    End If
    i = i + 1
    Wend
    xlsWWDB.Worksheets("Real IO").Select
    i = 1
    While Cells(i, 43) <> ""
    If Cells(i, 45) = Cells(i + 1, 45) Then
    Cells(i, 45).Interior.ColorIndex = 3
    Cells(i + 1, 45).Interior.ColorIndex = 3
    k = k + 1
    Else
    End If
    i = i + 1
    Wend
    xlsWWDB.Worksheets("Integer IO").Select
    i = 1
    While Cells(i, 43) <> ""
    If Cells(i, 45) = Cells(i + 1, 45) Then
    Cells(i, 45).Interior.ColorIndex = 3
    Cells(i + 1, 45).Interior.ColorIndex = 3
    k = k + 1
    Else
    End If
    i = i + 1
    Wend
    txtNoOfDupAddresses = k
    End Function
    Hope is the feeling that you get that the feeling that you have will not last very long.

  4. #4
    Join Date
    Aug 1999
    Posts
    28

    Smile

    Its been awhile since I've done any Excel programming but you might want to check out the MATCH function in Excel.

    I can remember using it to search and find a value I needed in a list. I believe it returns the cell coordinates of the matching value.

    Anyway check it out, it might be what you're looking for.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured