Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
My question is simply enough, but searching in the previous posts I didn't find any similar one. So, in my excel sheet after looking for a string with this command: Cells.Find(What:="REPORT DATE", LookIn:=xlFormulas, LookAt:=xlPart).Activate I need to put into a variable the first coordinate of row and column that satisfy my find criteria. Thanks in advance. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Andrea,
Try something like: '============= Public Sub Tester001() Dim SH As Worksheet Dim Rng As Range Dim sAdd As String Dim iRow As Long Dim iCol As Long Set SH = ActiveSheet '<<==== CHANGE With SH Set Rng = .Cells.Find(What:="REPORT DATE", _ After:=.Cells(1), _ LookIn:=xlFormulas, _ LookAt:=xlWhole, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False) End With If Not Rng Is Nothing Then With Rng sAdd = .Address(0, 0) iRow = .Row iCol = .Column End With End If End Sub '<<============= --- Regards, Norman "Andrea" wrote in message ... Hi, My question is simply enough, but searching in the previous posts I didn't find any similar one. So, in my excel sheet after looking for a string with this command: Cells.Find(What:="REPORT DATE", LookIn:=xlFormulas, LookAt:=xlPart).Activate I need to put into a variable the first coordinate of row and column that satisfy my find criteria. Thanks in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how can I paste 10 cells but inverting the position of the cells | Excel Discussion (Misc queries) | |||
How "memorize/save" sort in ExcelXP | Excel Programming | |||
How to find out merge cells from unknown position | Excel Discussion (Misc queries) | |||
creating a routine to help memorize | Excel Programming | |||
Returning MAX value and MATCH position in specific cells | Excel Programming |