VBA Cell.find

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I need to design a VBA macro that would find "paid" in Column A and would
select in value in column H.
Ex:
Column A Column H
Paid $100.00
I need to select the $100.00
Regards
 
Hi,
Technically, I'm going to use that worksheet that requires numbers not
formulas to be intergrated in a SAP application.
So I need a number.
Regards,
 
Record a macro when you do it once manually -- to get the settings correct for
the Find.

Option Explicit
Sub testme()

Dim FoundCell As Range
Dim FindWhat As String

FindWhat = "Paid"
With Worksheets("sheet1")
With .Range("a:a")
Set FoundCell = .Cells.Find(What:=FindWhat, _
After:=.Cells(.Cells.Count), _
LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False)
End With
End With

If FoundCell Is Nothing Then
MsgBox FindWhat & " wasn't found"
Else
Application.Goto FoundCell.Offset(0, 1)
End If

End Sub

I looked at xlPart and matchcase=false. Modify it as you need.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

offset.cell 15
Vlookup w/ VB 1
average acts different in rows and columns? 6
Average of % 5
I need a formula 4
HDI: Show Value as 'Percentage of' Grouped Column in Pivot 2
VBA Macro 3
Formula Question 2

Back
Top