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.
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.
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
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
Bookmarks