Results 1 to 3 of 3

Thread: Formula to find next value in row in MS Excel

  1. #1
    Join Date
    Jan 2009
    Posts
    66

    Formula to find next value in row in MS Excel

    Hi,
    I have windows XP installed on my desktop with MS Office 2007. I m looking for a formula or macro to find next value in row in MS Excel. Anyone have any idea?

    All suggestions are welcome.

  2. #2
    Join Date
    Jan 2008
    Posts
    3,755

    Re: Formula to find next value in row in MS Excel

    Try this:

    Sub test()
    Dim rngFound As Range
    Dim rngToSearch As Range
    Dim strFirstAddress As String

    Set rngToSearch = Sheets("Sheet1").Columns("A")
    Set rngFound = rngToSearch.Find(What:="Account Category:*", _
    LookAt:=xlWhole, _
    LookIn:=xlValues, _
    MatchCase:=False)
    If rngFound Is Nothing Then
    MsgBox "Sorry... Not Found"
    Else
    strFirstAddress = rngFound.Address
    Do
    rngFound.Select
    MsgBox rngFound.Value & " found at " & rngFound.Address
    Set rngFound = rngToSearch.FindNext(rngFound)
    Loop Until strFirstAddress = rngFound.Address
    End If
    End Sub

  3. #3
    Join Date
    Apr 2008
    Posts
    4,642

    Re: Formula to find next value in row in MS Excel

    You can do it by selecting the data on you worksheet. Follow these steps:
    • Highlight the cells in column
    • Select Edit
    • Then Go to Special -> Blank Cells
    • Type "=" and press the up arrow key
    • Press Ctrl+Enter

Similar Threads

  1. Replies: 2
    Last Post: 23-02-2012, 02:56 PM
  2. Replies: 1
    Last Post: 06-01-2012, 08:38 PM
  3. Replies: 6
    Last Post: 31-12-2011, 05:42 PM
  4. Excel Formula
    By Scott2580 in forum MS Office Support
    Replies: 2
    Last Post: 15-02-2011, 02:21 PM
  5. Excel formula
    By Me Me Taylor in forum Windows Software
    Replies: 2
    Last Post: 06-04-2009, 04:11 PM

Tags for this Thread

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
  •  
Page generated in 1,713,412,890.53472 seconds with 17 queries